private void addReplyToQueueReservedAttributes ( Map < String , MessageAttributeValue > messageAttributes , SQSMessage message ) throws JMSException { Destination replyTo = message . getJMSReplyTo ( ) ; if ( replyTo instanceof SQSQueueDestination ) { SQSQueueDestination replyToQueue = ( SQSQueueDestination ) replyTo ; /** * This will override the existing attributes if exists. Everything that * has prefix JMS_ is reserved for JMS Provider, but if the user sets that * attribute, it will be overwritten. */ addStringAttribute ( messageAttributes , SQSMessage . JMS_SQS_REPLY_TO_QUEUE_NAME , replyToQueue . getQueueName ( ) ) ; addStringAttribute ( messageAttributes , SQSMessage . JMS_SQS_REPLY_TO_QUEUE_URL , replyToQueue . getQueueUrl ( ) ) ; } }
Adds the reply - to queue name and url attributes during send as part of the send message request if necessary