简体   繁体   中英

What does it mean by approximate in ApproximateReceiveCount in ReceiveMessage?

In the documentation , it says that ApproximateReceiveCount "Returns the number of times a message has been received across all queues but not deleted."

So by approximate in the attribute's name, does it mean it's possible that the count can be off by a little? What are the cases where it can be unaccurate?

I tried polling for the receive count but they seem accurate to me.

SQS default queues will guarantee "at least once" delivery of your messages (make sure consumer processing is idempotent).

Could deliver multiple times in case of internal problems (the doc reads "On rare occasions, one of the servers that stores a copy of a message might be unavailable when you receive or delete a message.").

This behavior allows high throughput / low latency / high availability but there has to be a compromise on consistency.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM