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

Amazon SQS

2.2K
2K
+ 1
171
Mosquitto

134
302
+ 1
14
Add tool

Amazon SQS vs Mosquitto: What are the differences?

Introduction

In this article, we will discuss the key differences between Amazon Simple Queue Service (SQS) and Mosquitto, focusing on their unique features and capabilities.

  1. Message Protocols and Standards: One of the primary differences between Amazon SQS and Mosquitto is the messaging protocol they use. Amazon SQS is based on HTTP/HTTPS protocols, making it easy to integrate with a variety of applications over the internet. On the other hand, Mosquitto is based on the MQTT (Message Queuing Telemetry Transport) protocol, which is lightweight and specifically designed for IoT devices and low-bandwidth networks.

  2. Scalability and Managed Service: Amazon SQS is a fully managed service provided by Amazon Web Services (AWS), which means it handles most of the operational tasks such as scaling, monitoring, and maintaining the infrastructure. It can scale seamlessly to handle a large number of messages and provides high availability and durability. Conversely, Mosquitto is an open-source message broker that can be self-hosted, requiring manual scaling and maintenance.

  3. Supported Environments: Amazon SQS is a cloud-based messaging service that can be used in any environment, including web applications, mobile apps, and serverless architectures, regardless of the underlying infrastructure. Mosquitto, being an open-source project, can be deployed on-premises or in the cloud but requires more configuration and setup.

  4. Message Delivery Semantics: Amazon SQS guarantees at-least-once message delivery, where each message is delivered to the consumer at least once, ensuring that no message is lost. It provides features like visibility timeout and message retention to ensure reliable message processing. Mosquitto, on the other hand, provides three different levels of message delivery: "at most once," "at least once," and "exactly once," allowing users to choose the appropriate level of reliability based on their requirements.

  5. Message Filtering and Routing: Amazon SQS provides a feature called "message filtering," allowing consumers to selectively receive only the messages that match specific filter conditions. This helps in reducing the overhead of processing unwanted messages. Mosquitto, being an MQTT broker, supports its own set of filtering mechanisms such as topic-based filtering, which enables subscribers to subscribe to specific topics and receive relevant messages only.

  6. Integration with Other AWS Services: As part of the AWS ecosystem, Amazon SQS seamlessly integrates with other services like AWS Lambda, Amazon S3, and Amazon DynamoDB. This enables developers to easily build complex, scalable architectures using these services in conjunction with SQS. Mosquitto, being a standalone message broker, does not have native integrations with other AWS services and requires additional custom development for integration.

In summary, Amazon SQS is a managed messaging service that offers scalable and reliable messaging over HTTP/HTTPS, while Mosquitto is an open-source MQTT broker specifically designed for IoT devices. SQS provides ease of use, scalability, and integration with other AWS services, whereas Mosquitto offers lightweight messaging and is ideal for low-bandwidth networks and IoT use cases.

Advice on Amazon SQS and Mosquitto
MITHIRIDI PRASANTH
Software Engineer at LightMetrics · | 4 upvotes · 272.1K 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 · 208K 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
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Amazon SQS
Pros of Mosquitto
  • 62
    Easy to use, reliable
  • 40
    Low cost
  • 28
    Simple
  • 14
    Doesn't need to maintain it
  • 8
    It is Serverless
  • 4
    Has a max message size (currently 256K)
  • 3
    Triggers Lambda
  • 3
    Easy to configure with Terraform
  • 3
    Delayed delivery upto 15 mins only
  • 3
    Delayed delivery upto 12 hours
  • 1
    JMS compliant
  • 1
    Support for retry and dead letter queue
  • 1
    D
  • 10
    Simple and light
  • 4
    Performance

Sign up to add or upvote prosMake informed product decisions

Cons of Amazon SQS
Cons of Mosquitto
  • 2
    Has a max message size (currently 256K)
  • 2
    Proprietary
  • 2
    Difficult to configure
  • 1
    Has a maximum 15 minutes of delayed messages only
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is 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.

    What is Mosquitto?

    It is lightweight and is suitable for use on all devices from low power single board computers to full servers.. The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for Internet of Things messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers.

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

    What companies use Amazon SQS?
    What companies use Mosquitto?
    See which teams inside your own company are using Amazon SQS or Mosquitto.
    Sign up for StackShare EnterpriseLearn More

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

    What tools integrate with Amazon SQS?
    What tools integrate with Mosquitto?

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

    Blog Posts

    GitHubPythonNode.js+47
    54
    72304
    GitHubGitSlack+30
    27
    18319
    GitHubDockerAmazon EC2+23
    12
    6566
    GitHubPythonSlack+25
    7
    3155
    What are some alternatives to Amazon SQS and Mosquitto?
    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.
    Kafka
    Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.
    Redis
    Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.
    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.
    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.
    See all alternatives