-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SNS subscriptions to queues #266
Comments
What would be the use case? |
Subscribe sqs queues to sns topics
…On Fri, 16 Sept 2022, 09:18 Matthieu Napoli, ***@***.***> wrote:
What would be the use case?
—
Reply to this email directly, view it on GitHub
<#266 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASA3LTOJZUFIB6IXZF56N3V6RQRJANCNFSM6AAAAAAQNNFOXA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I also have a similar need in event-driven architecture. |
I have the same need as @Agrumas :/ |
A common pattern, usually called "fanout", is to subscribe SQS queues to SNS topics. AWS documentation has a basic example of the pattern here: https://aws.amazon.com/getting-started/hands-on/send-fanout-event-notifications/ Here's an example of what the CloudFormation configuration looks like (there's probably a CDK example out there too): https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#aws-resource-sns-subscription--examples--Create_a_subscription_with_optional_attributes--yaml Note the protocol set to |
Exactly this, I'm experiencing this on a project at the moment and have seen this used before in a few places, it's quite common for allowing resilient simplified async processing of independent pipelines e.g. |
I've had a stab at implementing this, see #344 I would appreciate any help simplifying or helping to resolve the issue about having to use ARN strings instead of Refs. |
sorry to chase up on this, after doing a little bit of digging I still can't find the "plugin way" to resolve refs in the linked PR e.g. constructs:
## adds a simple queue and unfiltered subscription
my-queue:
type: queue
worker:
handler: worker.handler
subscriptions:
- topic: !Ref MyTopic # this doesn't work does anyone have any reference material for working with refs that need to be resolved dynamically with lift? |
I've opened a discussion for this too #345 |
Managed to resolve it, PR now ready #344 |
@cmcnicholas it seems that your PR never got merged? It's such a nice feature |
Yer is a shame, I feel like this is a really common pattern. I've forked and been using it in a live project for a few months now so feel free to do the same until it maybe ends up in lift natively. |
@mnapoli Would you consider merging/looking into @cmcnicholas's PR? The |
@mnapoli , this pattern is almost universal. Not sure, why this is not getting the love it deserves :) |
I assum this could be a common usecase
The text was updated successfully, but these errors were encountered: