Score:1

Amazon SQS maximum in flight messages

bd flag

I want to use a FIFO SQS for message transport - while researching I found the following two statements:

  • Messages per queue: The number of messages that an Amazon SQS queue can store is unlimited.
  • Messages per queue (in flight): For FIFO queues, there can be a maximum of 20,000 inflight messages (received from a queue by a consumer, but not yet deleted from the queue). To avoid reaching the quota, you should delete messages from the queue after they're processed.

It's clear to me that there is a limit of 20k messages when I received the messages but did not yet delete them (so they are in their invisibility timeout).

What happens after the invisibility timeout and receive token expire? Do received, but not deleted messages also count towards this limit - even after a long period of time?

Score:1
bd flag

So I tried it myself and came to the following conclusion:

  • FIFO queues can hold an unlimited amount of messages
  • After peeking 20k messages (that are now considered "in flight"), you don't get any more messages trying to peek other available messages
  • After the receive handle of a in flight message expires, it will be deducted from the "in flight" quota and is considered "available" again
  • The service peeking messages, when the 20k quota is reached, does not get any error message but instead receives an empty message list.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.