Search code examples
amazon-snsaws-sqs-fifo

Keeping the same message group id between linked FIFO SNS and FIFO SQS


I have a FIFO SNS linked to a FIFO SQS (SNS sends messages to the SQS). Now I want to use message ordering, using the message group id. So the publisher of the message will set the message group id, while sending the message to the SNS. I want these messages to be consumed one by one for a group.

I read the documentation on this, here:

The SNS FIFO topic passes the group ID to the subscribed Amazon SQS FIFO queues.

Does this mean that a group id set for the FIFO SNS will be set as the group ID for the FIFO SQS? Or do I explicitly need to set the group ID in the FIFO SQS?


Solution

  • We don't need to explicitly set the group ID for the FIFO SQS, if it is linked to some FIFO SNS. I had implemented this, and saw that it was working fine.