RabbitMQ (AMQP mostly) and NATS /NATS Streaming comparison

  • consumer acknowledgements — used to ensure that the message has reached the intended consumer (what can be performed manually by our code or automatically),
  • transaction support for producer publish and consumer acknowledge methods (guaranteed to be atomic only when a single queue is used),
  • publisher confirms — provided as a faster alternative to transactions, these mechanisms allow us to confirm publishing of multiple messages at once (compared to having a commit per message in transactions),
  • message delivery mode — controls whether the messages stored in RabbitMQ node should be kept in memory or need to be written to disk, what results in different behaviour in case of unexpected broker crash,
  • queue durability — whether the queue’s metadata is stored on disk or in memory (with the same implications as above),
  • queue-level and message-level TTL — what controls when they are purged by the server (additionally RabbitMQ provides dead letter queues that allow us to capture these messages).
  • clustering — where exchange and queue metadata replicated across the cluster, and clients can consume messages from the whole cluster transparently; the messages are replicated depending on clustering configuration;
  • federation and shovel plugin — both of which allow for moving messages from broker to broker without replicating the whole topology and without the full clustering overhead.
  • with AMQP, we’d have a single exchange bound to a single queue,
  • with NATS, we’d have a single subject, and all consumers would belong to that queue group.
  • with AMQP, we’d have a single (fanout) exchange bound to multiple (potentially exclusive) queues — each consumer using its own queue.
  • with NATS, we’d keep a single subject, but this time we’d not use a queue group.

--

--

--

Software developer, Java mostly, C & C++ sometimes (https://www.linkedin.com/in/adam-kotwasinski/)

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Clone a linked list with next and random pointer with O(1) space complexity.

Automate AppAnalytics - AWS Stack

How to Reset Zigo Eon 43i

reset my phone

How to Change Your Terminal Prompt

Spring Autowired Collections, Lambda Functions, and Java Streams

Connecting Facebook Business Manager with Python for Insights :

Google Cloud PubSub background job queue with Cloud Function workers

CS373 Spring 2022: Jay Acosta

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Kotwasinski

Adam Kotwasinski

Software developer, Java mostly, C & C++ sometimes (https://www.linkedin.com/in/adam-kotwasinski/)

More from Medium

Measure Performance of Endpoint with k6

Bottlerocket: Operating System to Run Containers

A Key Problem in Deployment

Posgres Concurrency Notes: 1