Search code examples
amazon-web-servicesmicroservicesmessage-queueamazon-sqs

Using Amazon SQS for multiple consumers receiving the same message


I have one primary application sending messages to SQS Queue and want 4 consumer applications to consume the same message and process it however they want to

I am not sure what Queuing architecture to use for this purpose.

I see the option of Standard SQS, SQS FIFO, (SQS + SNSTopic) & Kenesis

For the functionality that I want it seems like either (SQS + SNS Topic) or Kenesis would be the way to go.

But I also have a question regarding Standard SQS & SQS FIFO - Is it not possible for all of the consumers to get the same message if I use SQS FIFO or Standard SQS?

I think I am confused between all the options and overwhelmed by all the information available on the Queues but still confused about which architecture to choose

Primary source of information is Amazon docs and https://www.schibsted.pl/blog/choosing-best-aws-messaging-service/

Some of the questions I went through on stackoverflow:

Link_1 This post answers the question of using multiple consumers with the Queue but not sure if it addressing the issue of same messages consumed by multiple consumers

Link_2 This one answers why Kenesis can be used for my scenario

Helpful_Info I used this article just to understand the differences

I would really appreciate some help on this. I am trying to read as much as possible but would definitely appreciate if someone can help me make the right decision


Solution

  • According to your use case SNS seems to be a a great choice however if you want to persist the messages you can use SQS with SNS.