简体   繁体   English

具有两个队列和一个使用者的 AWS SQS

[英]AWS SQS with two queues and one consumer

If I have two Amazon SQS simple queues and one consumer, how can the consumer consume the messages from both queues?如果我有两个 Amazon SQS 简单队列和一个消费者,消费者如何消费来自两个队列的消息?

I have two producers that produce messages on two different SQS queues.我有两个生产者在两个不同的 SQS 队列上生成消息。 How can one consumer that is listening to both queues consume the messages?一个同时监听两个队列的消费者如何消费这些消息?

The term "consumer" is applied to code that calls ReceiveMessage() on an Amazon SQS queue (since it consumes messages).术语“消费者”施加到调用代码ReceiveMessage()上的Amazon SQS队列(因为它消耗消息)。

For a consumer to consume messages from multiple queues, it would need to call ReceiveMessage() on both queues (separately).为了让消费者消费来自多个队列的消息,它需要在两个队列上(分别)调用ReceiveMessage() )。 There is no single command that consumes messages on multiple queues.没有一个命令可以使用多个队列上的消息。

For a consumer to "listen to both queues", it would need to call ReceiveMessage() on both queues.为了让消费者“监听两个队列”,它需要在两个队列上调用ReceiveMessage()

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

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