title: My SQSListener returns body as messageID, And How do I get send MessageId with QueueMessagingTemplate Spring Boot?
body: <p>I have 2 issues regarding Spring AWS-SQS sdk, (Or maybe I am doing it wrong).</p>
  
  <p>First is that I used CLI earlier and I managed to get the message Id of the sent message example:</p>
  
  <pre><code>aws sqs send-message --queue-url https://sqs.us-west-2.amazonaws.com/testqueue --message-body hooray   
  
  '{
      "MD5OfMessageBody": "d3101ad", 
      "MessageId": "jdhj-933"
  }
  </code></pre>
  
  <p>Now I tried with <code>spring-cloud-starter-aws-messaging</code> and I setup a Queue Messaging template like this </p>
  
  <pre><code>private final QueueMessagingTemplate queueMessagingTemplate;
  
    public SqsQueueService(@Qualifier("amazonSQSAsync") final AmazonSQSAsync amazonSQS) {
      this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSQS);
    }
  
    public void sendMessage(String queueName, String queueMessage) {
      Map&lt;String, Object&gt; headers = new HashMap&lt;&gt;();
      queueMessagingTemplate.convertAndSend(queueName, queueMessage, headers);
    }
  </code></pre>
  
  <p>I can seem to get the message Id of the sent message using <code>queueMessagingTemplate.convertAndSend(queueName, queueMessage, headers);</code></p>
  
  <p>I need the messageId to fulfil some business logic.</p>
  
  <p>The second issue is my listener can receive messages however the messageID is null as well;</p>
  
  <pre><code>  @Async
    @SqsListener(value = "${notification.sqs-queue-url}", deletionPolicy = SqsMessageDeletionPolicy.NEVER)
    public void listen(Acknowledgment acknowledgment, String message, String messageId) {
  
      //messageId is equal to message here. which is wrong for me
    }
  </code></pre>
  
  <p>The message is always equal to messageId, which is confusing, Any advice on where I maybe going wrong?</p>