0

I created a test SQS FIFO queue test.fifo - see screenshot below.

Then:

  1. I sent three messages to it with message-group-id = A, and message bodies A1, A2 and A3 respectively using AWS Console (via Send and receive messages button).

  2. Using AWS Console again, I polled for messages with 10 seconds polling, two times in a row. Every time, I saw all three messages in results, and I could open and see the message bodies for all.

Without deleting any message after receiving, how was I able to see all messages with same message-group-id at once? Isn't that a violation of FIFO nature of the queue?

screenshot show queue params.

Ermiya Eskandary
  • 15,323
  • 3
  • 31
  • 44
bappak
  • 865
  • 8
  • 23

1 Answers1

1

Isn't that a violation of FIFO nature of the queue?

No, of course not.

FIFO's main guarantee is around ordering, which would have been preserved in the console and you would have seen the messages in the same order you sent them.

It guarantees exactly-once processing, not exactly-one-message-being-received-at-a-time.

You can receive multiple messages at once, as mentioned in the FIFO docs:

It is possible to receive up to 10 messages in a single call using the MaxNumberOfMessages request parameter of the ReceiveMessage action. These messages retain their FIFO order and can have the same message group ID. Thus, if there are fewer than 10 messages available with the same message group ID, you might receive messages from another message group ID, in the same batch of 10 messages, but still in FIFO order.

Ermiya Eskandary
  • 15,323
  • 3
  • 31
  • 44