简体   繁体   English

AWS SQS队列是否彼此隔离?

[英]Are AWS SQS queues isolated from each other?

Say that I have two separate services, A and B, with SQS queues that are both subscribed to SNS topic "topic-foo". 假设我有两个单独的服务A和B,它们都有SQS队列,它们都订阅了SNS主题“ topic-foo”。 Then I publish a message m1 to the SNS topic "topic-foo". 然后,我向SNS主题“ topic-foo”发布消息m1。

If the SQS queue owned by service A (sqs-A) sees message m1 and processes it (ie pops it off the queue and processes the message so that it's no longer on sqs-A), will I still be guaranteed that the separate SQS queue owned by service B (sqs-B) will always be able to see and process message m1? 如果服务A(sqs-A)拥有的SQS队列看到消息m1并对其进行处理(即将其弹出队列并处理该消息,以使其不再位于sqs-A上),我是否仍可以保证单独的SQS服务B(sqs-B)拥有的队列将始终能够查看和处理消息m1? (in other words, does AWS SNS publishing guarantee multiple delivery to SQS queues and isolation of separate SQS queue processing?) (换句话说,AWS SNS发布是否保证向SQS队列的多次交付以及隔离单独的SQS队列处理?)

In your situation, you have two SQS queues, each one is subscribed to an SNS topic. 在您的情况下,您有两个SQS队列,每个队列都订阅了一个SNS主题。

In this case, when you send a message to the SNS topic, an item is added to each of the SQS queues. 在这种情况下,当您向SNS主题发送消息时,一个项目将添加到每个SQS队列中。 The two queues are distinct and independent, so processing the item in one queue will not affect the item in the other queue. 这两个队列是不同且独立的,因此处理一个队列中的项目不会影响另一队列中的项目。

This has nothing to do with SNS and is purely because your two SQS queues are two separate SQS queues. 这与SNS无关,纯粹是因为您的两个SQS队列是两个单独的SQS队列。 The fact that SNS is publishing to them doesn't change how the queues behave. SNS向它们发布的事实不会改变队列的行为。

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

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