NATS Fundamentals
NATS is an open-source messaging system in which applications exchange messages through named subjects instead of addressing each other directly. Core NATS delivers messages to currently connected subscribers at most once, while JetStream adds persistent streams, acknowledgements, and replay for messages that must survive time.
itDistributed systems, messaging, and integration | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — NATS Fundamentals
NATS is a messaging system that connects applications through subjects. A publisher sends a message to a subject; subscribers that express interest receive it without either side knowing the other's network address. It is a small binary that routes messages, from one server on a laptop to clusters spanning regions.
Before systems like this, services that wanted to talk to each other had to know each other's addresses, and a change in one meant a change in the other. NATS exists so that the address is a name — a subject — and the broker finds the listener.
Three ideas hold the practice up. Subjects are the addressing system, dot-separated names with * and > wildcards, and they are an API and a security boundary that is hard to change once applications depend on it. Core NATS is publish-subscribe for currently connected subscribers, at most once, with no storage — a message to a subject with no listener is not a failure, it is by design. JetStream adds persistent streams and consumers on top, decoupling publisher and subscriber in time as well as space, with at-least-once delivery and replay.
The one thing that surprises people: a missed Core NATS message is not a bug. Core NATS does not store, retry, or replay; it delivers to whoever is listening now. A team that uses Core NATS for order placement and then reports lost orders when a consumer restarts has not found a defect — it has chosen the wrong layer for a workload that needs time. The fix is a JetStream stream, not a bigger cluster.
The thing that catches every team: a JetStream acknowledgement is at-least-once, not exactly-once. Any unacknowledged message is redelivered, and a crash between the business work and the ack means the same message is processed twice. JetStream buys time-decoupling at the price of idempotency, and the application owns the idempotency — deduplication keys, idempotent operations — no matter how the stream is configured.
And the hard part is not the broker. The nats-server is a single binary that runs anywhere. The hard part is choosing a subject namespace that can survive the next year of features, because that namespace is the API.
Read the Intro for the two layers and the boundary between them. The Cheatsheet holds the subject wildcards and the consumer start positions side by side. The Timeline shows how a 2011 Cloud Foundry control plane grew JetStream, leaf nodes, and an agentic-AI workload — and why the subject model stayed the same while the persistence layer changed underneath it.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://docs.nats.io/concepts/what-is-nats
Supports
- NATS components
- subjects
- publish-subscribe model
- server
- clients
- ecosystem
- location transparency
- multi-tenancy
- https://docs.nats.io/learn/core-nats/
Supports
- Core NATS publish-subscribe
- at-most-once delivery
- queue groups
- request-reply
- https://docs.nats.io/concepts/subjects
Supports
- Dot-separated subjects
- star and greater-than wildcards
- subject naming as an API boundary
- https://docs.nats.io/concepts/jetstream
Supports
- JetStream streams
- consumers
- acknowledgements
- redelivery
- at-least-once delivery
- replay
- KV and object stores
- https://docs.nats.io/concepts/topologies
Supports
- Single server
- cluster
- super-cluster
- leaf node topologies
- https://docs.nats.io/concepts/security
Supports
- Accounts
- multi-tenancy
- messaging domain isolation
- security model
- https://en.wikipedia.org/wiki/NATS_Messaging
Supports
- NATS released 2011 by Derek Collison for Cloud Foundry
- Ruby then Go
- Apache 2.0
- JetStream replacing STAN
- https://www.cncf.io/projects/
Supports
- NATS accepted into the CNCF on 15 March 2018
- https://www.cncf.io/blog/2025/04/24/protecting-nats-and-the-integrity-of-open-source-cncfs-commitment-to-the-community/
Supports
- CNCF reaffirming NATS stewardship April 2025
- https://synadia.com/
Supports
- Synadia commercial steward of NATS and managed NATS service
- https://www.rabbitmq.com/
Supports
- RabbitMQ as an AMQP broker comparable to NATS
- https://kafka.apache.org/
Supports
- Apache Kafka as an append-only partitioned log compared to JetStream
- https://pulsar.apache.org/
Supports
- Apache Pulsar layered streaming platform
- https://redis.io/
Supports
- Redis pub/sub mode for lightweight in-memory messaging
- https://activemq.apache.org/
Supports
- Apache ActiveMQ multi-protocol Java broker
- https://www.hivemq.com/
Supports
- HiveMQ enterprise MQTT broker for IoT
- https://emqx.io/
Supports
- EMQX open-source MQTT broker at scale
- https://vernemq.com/
Supports
- VerneMQ distributed MQTT broker
