Need advice about which tool to choose?Ask the StackShare community!
Amazon Kinesis vs Amazon SQS: What are the differences?
Introduction
1. Data Volume and Throughput:
Amazon Kinesis is designed for handling massive streams of data with high throughput, allowing real-time processing of large amounts of data. On the other hand, Amazon SQS is best suited for decoupling application components and for smaller message volumes.
2. Data Retention:
In Amazon Kinesis, data retention is based on the time-to-live (TTL) setting, allowing data to be stored for a specified period. Conversely, Amazon SQS retains messages for a maximum of 14 days, after which they are automatically deleted.
3. Data Processing Model:
Amazon Kinesis offers real-time data streaming capabilities for processing continuously flowing data, whereas Amazon SQS follows a traditional message-queuing model, ensuring reliable message delivery between distributed components.
4. Scalability:
Amazon Kinesis provides dynamic scaling capabilities to handle fluctuating workloads efficiently, while Amazon SQS offers horizontal scaling by allowing multiple message queues and concurrent consumers to manage increased message processing.
5. Ordering of Messages:
Amazon Kinesis maintains the order of records within a shard, ensuring chronological processing of data within a partitioned stream. In contrast, Amazon SQS does not guarantee the ordering of messages across multiple queues, prioritizing fast and reliable message delivery.
6. Fan-Out Capability:
Amazon Kinesis supports fan-out architecture, allowing parallel processing of data streams by multiple consumers without impacting the performance. This feature is not available in Amazon SQS, where each message is processed by a single consumer exclusively.
In Summary, Amazon Kinesis and Amazon SQS differ in their handling of data volume, retention policies, data processing models, scalability options, message ordering, and fan-out capabilities.
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.
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
Pros of Amazon Kinesis
- Scalable9
Pros of Amazon SQS
- Easy to use, reliable62
- Low cost40
- Simple28
- Doesn't need to maintain it14
- It is Serverless8
- Has a max message size (currently 256K)4
- Triggers Lambda3
- Easy to configure with Terraform3
- Delayed delivery upto 15 mins only3
- Delayed delivery upto 12 hours3
- JMS compliant1
- Support for retry and dead letter queue1
- D1
Sign up to add or upvote prosMake informed product decisions
Cons of Amazon Kinesis
- Cost3
Cons of Amazon SQS
- Has a max message size (currently 256K)2
- Proprietary2
- Difficult to configure2
- Has a maximum 15 minutes of delayed messages only1