How to confirm delivery of Message to Amazon SQS Queue?


I am using AWS sdk for developing SQS based queue pub-sub.

In the very basic prototype, I am pushing messages concurrently to a queue I have already created. However, how can I be sure that my messages are being pushed to the queue ?

What is the guarantee that the messages pushed won’t fail in the process, for whatever reason ?

Amazon API query provides for ResponseMetadata which has the RequestID associated with that particular send message request. Is getting that enough to surely confirm the pushing of message to the Queue ?

Does the Amazon sendmessage request not give a response body with Http Code ?


See SendMessageResult. There’s a getMessageId() that should give you the message-id that was assigned to the message by SQS. If you get that, the message most certainly was delivered. The consumer of the message has access to this same ID when a message is received, and the ID is designed to be globally unique for an extended period of time.

Leave a Reply