简体   繁体   English

如何将 SQS FIFO 队列订阅到标准 SNS 主题?

[英]How to subscribe an SQS FIFO queue to a standard SNS topic?

Several different questions have been asked on how to subscribe an SQS FIFO queue to an SNS topic and their answers were " it's impossible " or, more recently, " it's now possible using an SNS FIFO topic ".关于如何将 SQS FIFO 队列订阅到 SNS 主题,已经提出了几个不同问题,他们的回答是“这是不可能的”,或者最近,“现在可以使用 SNS FIFO 主题”。

This question is a bit more specific in its premises:这个问题在它的前提下更具体一点:

  • Using an SNS FIFO topic is not a viable option, it has to be a "standard" topic使用 SNS FIFO 主题不是一个可行的选择,它必须是一个“标准”主题
  • Using a "standard" SQS queue is not a viable option, it has to be a FIFO queue使用“标准”SQS 队列不是一个可行的选择,它必须是 FIFO 队列

As of time of writing, AWS does not support a direct subscription.截至撰写本文时,AWS 不支持直接订阅。

How to achieve it in the next best way possible?如何以可能的下一个最佳方式实现它? Using an AWS Lambda?使用 AWS Lambda? EventBridge?事件桥?

As you said, this is currently not possible through direct subscription.正如您所说,目前无法通过直接订阅来实现。 A work around to achieve that is to subscribe a lambda to the standard topic and have that lambda sending to the FIFO Queue.解决方法是为标准主题订阅 lambda 并将 lambda 发送到 FIFO 队列。 It's not ideal since it adds an extra hop, but it does unblock your use-case这并不理想,因为它增加了一个额外的跃点,但它确实解除了您的用例的阻塞

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Java 中为 SQS 队列订阅 SNS 主题 - How to subscribe a SQS queue to a SNS topic in Java 在 golang 中订阅 SNS 主题和/或 SQS 队列? - Subscribe to an SNS topic and / or SQS queue in golang? 我可以将 AWS FIFO 队列与 AWS SNS 标准主题一起使用吗? - Can I use AWS FIFO Queue with AWS SNS Standard Topic? 如何在 AWS CloudFormation 中创建 Amazon SQS 队列并将其订阅到 Amazon SNS 主题? - How to create and subscribe an Amazon SQS queue to an Amazon SNS topic in AWS CloudFormation? SNS FIFO 主题不将消息扇出到 SQS FIFO 队列 - SNS FIFO Topic Doesn't fan out messages to SQS FIFO queue 使用 aws cdk(typescript) 将 sqs 队列订阅到不同帐户中的 sns 主题 - Subscribe a sqs queue to a sns topic that is in a different account, using aws cdk(typescript) 消息写入 SNS 主题,但没有订阅 SQS 队列 - Message written to SNS topic, but no SQS queue subscribed SNS SQS - 未收到从 SNS 主题推送到队列的消息 - SNS SQS - Not receiving messages that were pushed to queue from SNS topic 是否可以集成 AWS SNS 和 AWS SQS FIFO 队列 - Is it possible to integrate AWS SNS and AWS SQS FIFO queue 如何使用boto3通过另一个帐户的SQS订阅一个帐户的SNS主题? - How to subscribe an SNS topic of one account by SQS of another account using boto3?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM