Need advice about which tool to choose?Ask the StackShare community!

Amazon MQ

54
325
+ 1
12
Amazon SNS

1.4K
1.2K
+ 1
18
Add tool

Amazon MQ vs Amazon SNS: What are the differences?

Introduction

In this Markdown code, we will discuss the key differences between Amazon MQ and Amazon SNS. Both are messaging services provided by Amazon Web Services (AWS), but they have distinct features and functionalities that set them apart.

  1. Message Types: Amazon MQ is a managed message broker service that supports multiple messaging protocols like AMQP, MQTT, STOMP, and OpenWire. It enables you to use both queue-based and topic-based message queues for point-to-point and publish-subscribe communication patterns. On the other hand, Amazon SNS is a fully-managed pub/sub messaging service that supports only simple messaging over various transport protocols like HTTP, HTTPS, email, SMS, and mobile push notifications. It facilitates the dissemination of messages to multiple recipients simultaneously.

  2. Message Persistence: Amazon MQ provides durable message storage, meaning it can store messages when the recipient or subscriber is not available to receive them. It ensures the durability of messages even in the event of a broker failure. In contrast, Amazon SNS doesn't store messages persistently. It follows the "fire and forget" model, where messages are not stored and are only delivered to active subscribers at the time of publishing.

  3. Message Ordering: Amazon MQ guarantees the ordering of messages within a single queue, maintaining the FIFO (First-In-First-Out) order. It ensures that the oldest message is consumed first before moving on to the next one. On the other hand, Amazon SNS doesn't guarantee message ordering. Messages published to SNS topics can be delivered to subscribers in any order, and they are not necessarily processed in the same sequence they were sent.

  4. Message Filtering: Amazon MQ supports message filtering at the broker level, allowing subscribers to receive only specific messages based on defined criteria. It provides flexible filtering options using message selectors and header attributes. In contrast, Amazon SNS doesn't offer built-in message filtering capabilities. Subscribers of an SNS topic receive all the messages published to the topic, without the ability to filter based on message content.

  5. Scaling: Amazon MQ enables automatic scaling of broker instances to handle increased message traffic. It automatically adjusts resources based on the workload to ensure optimal performance. On the other hand, Amazon SNS doesn't require scaling since it can handle high message volumes and traffic by design. It automatically provisions resources as needed to deliver messages.

  6. Message Processing: Amazon MQ supports advanced features like message redelivery, dead-letter queues, and message acknowledgement, ensuring reliable message processing and handling. It provides mechanisms to handle failed message deliveries and handle messages that couldn't be processed successfully. In contrast, Amazon SNS doesn't offer these advanced message processing features. It focuses more on the publish-subscribe pattern without extensive handling of message errors or retries.

In Summary, Amazon MQ is a managed message broker service that supports multiple protocols, offers message persistence, ordering, filtering, scaling, and advanced message processing. On the other hand, Amazon SNS is a fully-managed pub/sub messaging service that supports simple messaging over various transport protocols and provides high scalability for message delivery but lacks some of the advanced features of Amazon MQ.

Advice on Amazon MQ and Amazon SNS
MITHIRIDI PRASANTH
Software Engineer at LightMetrics · | 4 upvotes · 289.3K views
Needs advice
on
Amazon MQAmazon MQ
and
Amazon SQSAmazon SQS
in

I want to schedule a message. Amazon SQS provides a delay of 15 minutes, but I want it in some hours.

Example: Let's say a Message1 is consumed by a consumer A but somehow it failed inside the consumer. I would want to put it in a queue and retry after 4hrs. Can I do this in Amazon MQ? I have seen in some Amazon MQ videos saying scheduling messages can be done. But, I'm not sure how.

See more
Replies (1)
Andres Paredes
Lead Senior Software Engineer at InTouch Technology · | 1 upvotes · 220.4K views
Recommends
on
Amazon SQSAmazon SQS

Mithiridi, I believe you are talking about two different things. 1. If you need to process messages with delays of more 15m or at specific times, it's not a good idea to use queues, independently of tool SQM, Rabbit or Amazon MQ. you should considerer another approach using a scheduled job. 2. For dead queues and policy retries RabbitMQ, for example, doesn't support your use case. https://medium.com/@kiennguyen88/rabbitmq-delay-retry-schedule-with-dead-letter-exchange-31fb25a440fc I'm not sure if that is possible SNS/SQS support, they have a maximum delay for delivery (maxDelayTarget) in seconds but it's not clear the number. You can check this out: https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Amazon MQ
Pros of Amazon SNS
  • 7
    Supports low IQ developers
  • 3
    Supports existing protocols (JMS, NMS, AMQP, STOMP, …)
  • 2
    Easy to migrate existing messaging service
  • 12
    Low cost
  • 6
    Supports multi subscribers

Sign up to add or upvote prosMake informed product decisions

Cons of Amazon MQ
Cons of Amazon SNS
  • 4
    Slow AF
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    What is Amazon MQ?

    Amazon MQ is a managed message broker service for Apache ActiveMQ that makes it easy to set up and operate message brokers in the cloud.

    What is Amazon SNS?

    Amazon Simple Notification Service makes it simple and cost-effective to push to mobile devices such as iPhone, iPad, Android, Kindle Fire, and internet connected smart devices, as well as pushing to other distributed services. Besides pushing cloud notifications directly to mobile devices, SNS can also deliver notifications by SMS text message or email, to Simple Queue Service (SQS) queues, or to any HTTP endpoint.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Amazon MQ?
    What companies use Amazon SNS?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Amazon MQ?
    What tools integrate with Amazon SNS?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    GitHubPythonNode.js+47
    55
    72811
    GitHubDockerAmazon EC2+23
    12
    6615
    What are some alternatives to Amazon MQ and Amazon SNS?
    Amazon SQS
    Transmit any volume of data, at any level of throughput, without losing messages or requiring other services to be always available. With SQS, you can offload the administrative burden of operating and scaling a highly available messaging cluster, while paying a low price for only what you use.
    RabbitMQ
    RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
    IBM MQ
    It is a messaging middleware that simplifies and accelerates the integration of diverse applications and business data across multiple platforms. It offers proven, enterprise-grade messaging capabilities that skillfully and safely move information.
    ActiveMQ
    Apache ActiveMQ is fast, supports many Cross Language Clients and Protocols, comes with easy to use Enterprise Integration Patterns and many advanced features while fully supporting JMS 1.1 and J2EE 1.4. Apache ActiveMQ is released under the Apache 2.0 License.
    Kafka
    Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.
    See all alternatives