1
votes

As per the documentation of Amazon aws docs it says

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). If you reach this quota, Amazon SQS returns no error messages. If your queue has a large backlog of 20,000 or more messages with the same message group ID, FIFO queues might be unable to return the messages that have a different message group ID but were sent to the queue at a later time until you successfully consume the messages from the backlog.

The thing I am not able to understand here is that if fifo queue does not send next batch of n messages(maximum 10) if previous batch is in progress across any parallel consumers with the same group id. Then how can there be at max 20K messages in flight mode with the same group id. According to what I understand there can be at max 10 messages in flight mode for the same group id. If that batch of messages is somehow not processed(not acknowledged) then fifo queue will redeliver those after visibility timeout ends ending with same number of messages in flight mode.

Can someone help me clarify this?

1
Is there a particular situation you are wanting to resolve? For example, having more than 10 in-flight messages for the same GroupId?John Rotenstein

1 Answers

1
votes

It is not saying that there can be 20,000 messages in-flight with the same GroupId.

  • "there can be a maximum of 20,000 inflight messages" refers to ALL messages, regardless of GroupId
  • "If your queue has a large backlog of 20,000 or more messages with the same message group ID" refers to a backlog of unprocessed messages. It is not referring to in-flight messages.

Basically, it's saying that if a particular GroupId is in-flight, and there are 20,000+ messages with the same GroupId waiting in the queue (not in-flight), SQS might not be able to get to any messages with a different GroupId that are 'behind' those 20,000 messages.