简体   繁体   English

亚马逊发布/订阅队列

[英]Amazon Pub/Sub Queues

I want to use a native AWS queuing mechanism to implement a pub/sub process where there one publisher and multiple consumers, but for each message, there is only a single possible receiver.我想使用原生 AWS 排队机制来实现一个发布/订阅流程,其中有一个发布者和多个消费者,但对于每条消息,只有一个可能的接收者。 Is this possible using SQS or SNS, or do these always go to all consumers?这是否可能使用 SQS 或 SNS,或者这些总是 go 给所有消费者? Would I need to go to Amazon-MQ?我需要 go 到 Amazon-MQ 吗? Or maybe a combination of SNS and an ELB?或者 SNS 和 ELB 的组合?

Thanks,谢谢,

Stan斯坦

The default (simple) implementation sens all SNS messages to all subscribers (in your case SQS).默认(简单)实现将所有 SNS 消息发送给所有订阅者(在您的情况下为 SQS)。 Since I don't know what exactly is your case, I would say this.因为我不知道你的具体情况,所以我会这样说。 If the message content determines which subscriber should get the message, then use SNS filters .如果消息内容决定了哪个订阅者应该收到消息,则使用SNS 过滤器 If there is some logic or rules that need to be built, use MQ.如果需要构建一些逻辑或规则,请使用 MQ。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM