1

I want to use a native AWS queuing mechanism to implement a pub/sub process where there one publisher and multiple consumers, but for each message, there is only a single possible receiver. Is this possible using SQS or SNS, or do these always go to all consumers? Would I need to go to Amazon-MQ? Or maybe a combination of SNS and an ELB?

Thanks,

Stan

  • How would the "single possible receiver" be determined -- are they known when the message is written, or is it determined by later logic? How would the receiver want to receive their message (for example, would they receive an HTTP request, or would they retrieve a message from a queue)? – John Rotenstein Feb 25 '22 at 08:06
  • I need the queueing mecahnism to determine who should receive it. So it's a load balancing mechanism. – user1331548 Apr 01 '22 at 04:48
  • What input would be used to determine the user? Would it need to examine the content of the message, or can it use a Message Attribute that is attached when the message is sent to the Amazon SNS Topic? What do you mean by "it's a load balancing mechanism" -- do you mean you want it to go "round robin", sending a message to the 'next user', regardless of actual message content? More information, please. – John Rotenstein Apr 01 '22 at 05:12

1 Answers1

0

The default (simple) implementation sens all SNS messages to all subscribers (in your case SQS). Since I don't know what exactly is your case, I would say this. If the message content determines which subscriber should get the message, then use SNS filters. If there is some logic or rules that need to be built, use MQ.

Itamar Kerbel
  • 2,508
  • 1
  • 22
  • 29