Amazon MQ 和 SQS 有什么区别?

What is the difference between Amazon MQ and SQS?

我是 AWS 的新手。据我了解,AWS MQ 和 AWS SQS 都是消息队列工具。唯一值得注意的区别是 SQS 是完全托管的。

我们什么时候应该使用 SQS 或 MQ?

SQS 是一种简单的排队服务。它不支持许多更高级别的抽象,如消息路由、扇出、分发列表等。它是一个队列——生成一条消息,然后传递一条消息。当您需要一个支持逻辑有限的队列时,它很有用。

AWS MQ 是一种托管的 Apache ActiveMQ(或 RabbitMQ)代理服务。

这为您提供了一个完全托管的云端 Apache ActiveMQ 系统,支持各种行业标准队列和广播协议,如 AMQP、JMS 等。当您有复杂的传送规则时,它很有用 - 或者当您我正在将现有系统从 AWS 外部迁移到 AWS,并且您的系统碰巧使用标准队列协议相互通信。

来自 AWS Documentation,您可以搜索“问:我应该何时使用 Amazon MQ 与 Amazon SQS 和 SNS?”:

Amazon MQ, Amazon SQS, and Amazon SNS are messaging services that are suitable for anyone from startups to enterprises. If you're using messaging with existing applications, and want to move your messaging to the cloud quickly and easily, we recommend you consider Amazon MQ. It supports industry-standard APIs and protocols so you can switch from any standards-based message broker to Amazon MQ without rewriting the messaging code in your applications. If you are building brand new applications in the cloud, we recommend you consider Amazon SQS and Amazon SNS. Amazon SQS and SNS are lightweight, fully managed message queue and topic services that scale almost infinitely and provide simple, easy-to-use APIs. You can use Amazon SQS and SNS to decouple and scale microservices, distributed systems, and serverless applications, and improve reliability.

此外,在此文档中,您可以检查与其他服务的比较。