49

I am a newbie to AWS. As I understand, both AWS MQ and AWS SQS are Message Queue tools. The only noted difference is that SQS is fully managed.

When should we use SQS or MQ?

BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
mishav
  • 599
  • 1
  • 4
  • 7

3 Answers3

62

SQS is a simple queueing service. It doesn't support many higher level abstractions like message routing, fanouts, distribution lists etc. It is a queue - a message is produced, and a message is delivered. It is useful when you need a Queue with limited backing logic.

AWS MQ is a managed Apache ActiveMQ(or RabbitMQ) broker service.

This provides you a fully managed Apache ActiveMQ system in the cloud, with support for a variety of industry-standard queue and broadcast protocols like AMQP, JMS etc. It is useful when you have complicated delivery rules - or when you're migrating an existing system from outside AWS into AWS, and your systems happen to talk to one another with a standard queueing protocol.

BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
mcfinnigan
  • 11,442
  • 35
  • 28
  • 6
    Adding to the above answer, In simple terms we can say that Amazon SQS is simplified version of ActiveMQ. In ActiveMQ you have a concept of Broker, which contains one or more Queues. You can learn more about ActiveMQ in this video https://www.youtube.com/watch?v=s-E_V5Xyg6k – shubham singh Sep 07 '20 at 03:15
  • 4
    Although technically it is true that SQS doesn't support routing and fanouts it is worth mentioning that it is often used in SNS + SQS combination. Which gives one message filtering and fanouts among other features. – BinaryButterfly Oct 11 '21 at 18:53
20

From AWS Documentation, you can search "Q: When should I use Amazon MQ vs. Amazon SQS and 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.

Also, in this doc, you can check comparisons with other services.

GreatNews
  • 575
  • 5
  • 13
0

Amazon MQ is a managed message broker service that provides compatibility with many popular message brokers. We recommend Amazon MQ for migrating applications from existing message brokers that rely on compatibility with APIs such as JMS or protocols such as AMQP, MQTT, OpenWire, and STOMP.

Amazon SQS and Amazon SNS are queue and topic services that are highly scalable, simple to use, and don't require you to set up message brokers.

Amazon SQS is a managed service that offers hosted queues that let you integrate and decouple distributed software systems and components.

Amazon SNS is also a managed messaging service, but it provides message delivery from publishers to subscribers (also known as producers and consumers). Publishers communicate asynchronously with subscribers by sending messages to a topic, which is a logical access point and communication channel. Clients can subscribe to the Amazon SNS topic and receive published messages using a supported endpoint type, such as Amazon Kinesis Data Firehose, Amazon SQS, Lambda, HTTP, email, mobile push notifications, and mobile text messages (SMS).

Both Amazon SQS and Amazon SNS are recommended for new applications that can benefit from nearly unlimited scalability and simple APIs.

Reference : Differences between Amazon SQS, Amazon MQ, and Amazon SNS

j4jada
  • 334
  • 1
  • 9