spring-cloud-aws icon indicating copy to clipboard operation
spring-cloud-aws copied to clipboard

Abstraction for, and exposing, SQS SendMessageResult

Open akberc opened this issue 9 years ago • 3 comments

The sendInternal method of QueueMessageChannel only returns a boolean and the class is designed in a way that does not support extension.

In addition,SendMessageRequest cannot be manually invoked as the auto-configured queue URL is not exposed or easily retrievable.

We had a CQRS pattern project in which we needed to retrieve the message ID for status update from the queue consumer.

akberc avatar Sep 21 '16 04:09 akberc

Hi @akberc

You can use the annotation @Header or @Headers in this case.

@SqsListener("queueName")
public void listenerMethod(@Header("MessageId") String messageId) {/*...*/}

// OR

@SqsListener("queueName")
public void listenerMethod(@Headers Map<String, String> headers) {/*...*/}

alainsahli avatar Oct 14 '16 09:10 alainsahli

Hi @adriancole I need to get this message id, when I send a message, not get that when consumer message.

Damon-LiuZhiJun avatar Mar 31 '17 05:03 Damon-LiuZhiJun

any update on tihs?

raoofm avatar Jan 12 '18 06:01 raoofm