agiledigital / agiledigital/serverless-sns-sqs-lambda

Support for fanout pattern (multiple subscriptions)

Offen
#521 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
85
Forks
20
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I find that this plugin works well for 1:1 message transfer between sns and sqs, but do you support sqs with multiple subscriptions. My use case requires the use of the SNS fanout pattern, so I'm wondering what the configuration would look like. I tried the most obvious config below, but I only see one (the last) subscription bound to my SQS queue.

```
functions:
processEvent:
handler: handler.backofficeConsumer
events:
- snsSqs:
name: sqsbackoffice
topicArn: !Ref RegisterBroker
- snsSqs:
name: sqsbackoffice
topicArn: !Ref UpdateBroker

resources:
Resources:
RegisterBroker:
Type: AWS::SNS::Topic
Properties:
TopicName: sns-register-broker
UpdateBroker:
Type: AWS::SNS::Topic
Properties:
TopicName: sns-update-broker
```

In serverless.yml I could do something like this, but I want to use your integration to have a queue between them:

```
functions:
hello:
handler: handler.run
events:
- sns:
arn: arn:aws:sns:us-east-1:00000000000:topicname
topicName: topicname-account-1-us-east-1
- sns:
arn: arn:aws:sns:us-east-1:11111111111:topicname
topicName: topicname-account-2-us-east-1
```

Appreciate any suggestions.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.