Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

SNS + SQS Fan Out

Pragya Keshap answered on February 21, 2023 Popularity 3/10 Helpfulness 3/10

Contents


More Related Answers

  • why sns over sqs

  • SNS + SQS Fan Out

    0

    You subscribe one or more SQS queues to an SNS topic

    when you publish a message to a Topic, SNS sends it to every subscribed Queue, fanning out the notification to those queues.

    If SQS is highly available and scalable you might wonder why you would need fan-out. Reason is that you might want different things to be happening in reaction of an event, and you want to decouple this business logic.

    Without fan-out your Lambda function would then be in charge of all the different responsibilities. No really decoupled, right?

    You can subscribe multiple queues to the same topic to replicate a message over multiple queues.

    Each queue will receive the identical message and react accordingly.

    There is an interesting tutorial here

    On top of this you can also play around with filters and message attribute to replicate messages only to some queues. By specifying a Filter Policy in the Queue Subscription, you will then have your Publisher sending out the event, and SNS handle the logic to forward it to the multiple interested queues, ignoring those where the attributes don't match the business logic. (nice article here)

    Popularity 3/10 Helpfulness 3/10 Language whatever
    Source: Grepper
    Tags: out whatever
    Link to this answer
    Share Copy Link
    Contributed on Feb 21 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.