3 ms·
Nats is not a replacement for pulsar or rabbitmq. It is a message passing system designed to pass lots of messages live, however if nobody is their to receive t
by liquidgecka 7y ago
Nats is not a replacement for pulsar or rabbitmq. It is a message passing system designed to pass lots of messages live, however if nobody is their to receive them they are lost and gone forever. There is a streaming layer but that is closer to Kafka and still does not provide the typical message model with an ack/nack API.
I have used nats in several different ways but since it can be lossy its never been considered as a replacement for a pub sub message queue on my end. We used it for a chat message layer and that worked pretty well.
As for its message passing layer that can be interesting but you end up writing all the retry and failure logic anyway so its usually just better to use an existing message layer that handles all of that for you anyway without all the funky abstractions.
Again, its interesting but nowhere near close to being a rabbit or pulsar replacement if reliability is a goal.
- DevKoala 7y agoThank you for the observation.
- bauerd 7y agoSounds like zeromq to me
- JensRantil 7y agoSemi-correct observation. You could think of it as a ZeroMQ broker that supports the pub/sub patternz, yes. Difference is it's centralized (with support for HA), adds security, gives you monitoring, supports multi-tenancy and horizontal scaling allowing to connect multiple clusters. Benefit of using broker is that service discovery is a no-op. Also, NATS has client libraries for many languages that adds request/response semantics on top of the pub/sub semantics.
- httgp 7y agoThere’s also Liftbridge, which is a Kafka-like pub-sub API built on top of NATS. It is still in development but looks quite promising IMO.