Amazon SQS Long Polling not returning all messages

后端 未结 3 797
难免孤独
难免孤独 2020-12-14 23:50

I have a requirement to read all messages in my Amazon SQS queue in 1 read and then sort it based on created timestamp and do business logic on it.

To make sure all

3条回答
  •  失恋的感觉
    2020-12-15 00:28

    Because SQS is, on the back-end, a distributed system, there is no guarantee that any particular request will be able to return the maximum number of messages that are being polled for.

    You just have to keep calling, till you are confident enough that you have as many items as you would expect, or that the queue has been emptied.

提交回复
热议问题