One SQS message, several handlers

Hey there,

is it possible to publish a message in SQS and have several handlers subscribe to this message? If the answer is yes, are there examples?


Have not tried to do so yet, but do assume you could. You would just subscribe the handlers/functions to the same Queue in the “events” section of your yaml file.

I assume you could follow one of these setups to get you started. I believe you could just use the same queue name in the events area I would expect.

I’m thinking something like below: You could use different Queue Subscription methods though.

    handler: handler.compute
      - sqs: arn:aws:sqs:region:XXXXXX:MyFirstQueue
    handler: handler.add
      - sqs: arn:aws:sqs:region:XXXXXX:MyFirstQueue
1 Like

Yes yes, that actually works. Thanks!