spring-attic / spring-cloud-aws

All development has moved to https://github.com/awspring/spring-cloud-aws Integration for Amazon Web Services APIs with Spring
https://awspring.io/
Apache License 2.0
590 stars 373 forks source link

Abstraction for, and exposing, SQS SendMessageResult #173

Open akberc opened 8 years ago

akberc commented 8 years ago

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.

alainsahli commented 8 years ago

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) {/*...*/}
Damon-LiuZhiJun commented 7 years ago

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

raoofm commented 6 years ago

any update on tihs?