Implementing Messaging with NATS JetStream
Learn about NATS, JetStream for durable streams, and enhancing asynchronous communication through dedicated am and jetstream packages.
What is NATS?
NATS is a very popular messaging broker that supports subject-based messaging and publish-subscribe (pub-sub). Core NATS also supports load-balanced queue groups, so the competing consumer pattern can be used to scale up for higher message processing rates. It does not support, at least at the time of writing this course, partitioned queues.
NATS is capable of distributing millions of messages a second and, compared with many other message brokers, it has an easy-to-use API and message model, as described here:
Subject: A string containing where the message is to be published or was published to.
Payload: A byte slice capable of holding up to 64 megabytes (MB); the NATS maintainers
recommend smaller sizes, though. ...