Reputation: 267270
When looking at the properties of a SQS message, do any of the message properties indicated if this message has been received before?
I can see that the message has the properties:
From the above I guess it doesn't expose the number of retries? Because I know there is a setting where you can force the message to go to 'dead letters' if it is retried too many times.
Upvotes: 1
Views: 1213
Reputation: 4302
There is a ApproximateReceiveCount and ApproximateFirstReceiveTimestamp attribute that you can use.
Using the Java SDK you can access the attributes with the Map<String,String> getAttributes()
method on the Message
object. E.g. message.getAttributes().get("ApproximateReceiveCount")
Upvotes: 4