Writing criteria for this guide
Every "for Mere Mortals" guide is written to the same nine-point standard, so a reader who trusts one can trust the rest. Here it is, with the verification notes for this particular guide below.
- Fix it first. Reader outcomes lead, not action items: each chapter opens by naming the outcome it delivers, shows a check the reader can run to confirm they got it, and a reasonable reader finishes able to state what was done, what it means, and what to try next.
- Plain language. Short sentences, everyday vocabulary, technical terms defined on first use. No slang, and no idioms that only make sense in one country — the reader may be translating as they go.
- No dead ends. A guide never tells the reader to do something it cannot show them how to verify. Every claim a reader relies on — an install, a command, an output — is something this guide demonstrates or clearly labels documented-only below.
- Live-verified where it matters. Procedures are run for real in the guide's lab wherever the build machine allows it, and the transcripts kept in the repository are the evidence. What could not be run is listed honestly below, never presented as if it had been.
- General audiences. Nothing in this guide — examples, fixtures, names, addresses — is modelled on any particular reader or author's real life, network, or organisations. The lab's fixture is an invented shop on loopback, with invented users and invented secrets.
- Standalone. A reader needs this guide, its lab, and nothing else. Where another guide would genuinely help, it is pointed to once, by name, and the chapter still completes without it.
- Honest about limits. Chapter 13 names what the tool cannot do: a core that forgets by design and offers no delivery guarantee, no content-based routing, a 1 MB default message ceiling, slow consumers shed rather than waited for, JetStream whose one-replica lab form survives a process restart but not a dead disk, and redelivery that stops at a consumer's cap with the aftermath left to the operator.
- The ethics rule is in the text, early. A messaging server decides whose words travel where, so chapter 10 states the line before its procedures depend on it: an unconfigured NATS server accepts anyone who can reach its port, messages are only as private as the server's door, credentials are real secrets to be hashed and file-permissioned rather than printed like the lab's invented ones, and listening on a broad wildcard is a responsibility to exercise on your own systems, not other people's.
- Builds clean. The site builds with MkDocs in strict mode with no warnings, and a fresh reader following the chapters in order reaches the stated outcome of each.
Verification notes for this guide
The build machine is a 2-CPU, 7.7 GB Ubuntu 24.04 sandbox,
shared with other work while the lab ran (timings are
therefore ranges, and the guide says so). nats-server
2.15.2 and the nats CLI 0.5.1 were installed from the
projects' official GitHub release archives and run
unmodified. The server ran on loopback with client port
18084 and monitoring port 18085 (the sandbox assigns
ports), JetStream enabled with its store directory inside
the lab's own space. All transcripts live in
nats-lab/transcripts/; the lab's stream, consumer and
server configuration files, and its object-store payload,
live in nats-lab/ beside them.
Run for real, with transcripts as evidence:
- Both version checks, and the two release archives' contents (t00).
- Server start with JetStream:
/healthzanswering{"status":"ok"},/varzreporting version 2.15.2, port 18084, JetStream enabled with its store directory, and the 1 MB maximum payload (t01). - Core publish/subscribe: three of three messages received in order by a subscriber that started first — and the message published before it started absent, the forgetful core demonstrated rather than asserted (t02).
- Wildcards against the same three messages:
orders.*received exactly the one-word subject,orders.>all three (t03). - Request/reply: a static responder answering in about
half a millisecond; an immediate
No responders are availablefor an unserved subject; a--commandresponder working withecho— and the same mechanism returning an empty reply, twice, when the command contained adateformat's%characters (t04). - Queue groups: two members and one plain subscriber, six jobs — the plain subscriber took 6 of 6, the group members 0 and 6 (kept, not re-rolled: small samples of a random pick can shut a member out); a twenty-job rerun split 9/11, twenty deliveries, no job lost or doubled (t05).
- JetStream stream SHOP created from a config file — after the interactive form refused to run without a terminal — catching three published messages, and provably not holding the three published before it existed (t06).
- A pull consumer with explicit acknowledgement: two
messages fetched and acked; a third fetched with
--no-ack, waited out past its 10-second ack wait, and redelivered withtries: 2, then acknowledged; consumer state read back clean (t07). - The key-value store: bucket created, three puts,
revision 3 read back as the latest value, history
shown, and the store directory listed — the bucket is
a stream,
KV_SETTINGS, beside the hand-made SHOP (t08). - Persistence: server killed and restarted against the same store directory; the stream still held its three messages with their original timestamps and the KV value read back unchanged (t09).
- A token-locked server: no token and wrong token both
refused with
Authorization Violation, right token accepted (t10). Named users: a fenced user publishing inside its fence and refused outside it with a permissions violation naming the subject; an unfenced user publishing anywhere; an unknown user refused at the door (t11). - Monitoring:
/connzlisting the lab's own CLI subscriber by name;nats benchpublishing 2,000 small messages at a measured ~190,000 messages/second (loopback, shared machine, core path — chapter 13 frames the number); and three failures verbatim — no server on the port, and an invalid subject refused by the client (t12). - The object store: a 52-byte file put in one chunk with its SHA-256 digest, fetched back under a new name, and proven identical by checksum and diff (t13).
Documented only — described from the project's documentation, not run, and the text does not claim otherwise:
- Clustering, gateways and leaf nodes: one machine means one server, so JetStream replication (the real answer to a dead disk) is described, not demonstrated.
- Push consumers: the pull form was run; the contract they share is what the chapter teaches.
- Interest and work-queue retention policies: named in chapters 8 and 13, not exercised.
- Key-value watches and conditional (revision-checked) puts: single-client lab, so described from the docs.
- Client libraries in programming languages, and the account/operator/JWT security machinery and TLS of hosted NATS: pointed at in the README and chapters 10 and 13, deliberately not taught.
- The neighbour tools of chapter 12 (RabbitMQ, MQTT, Redis, Kafka, ZeroMQ) — characterised from their documentation and this series' own guides, not run for this chapter.
Fixtures are this guide's own and deliberately generic:
an invented shop (shop.order.1, stock orders for
notebooks and pencils), invented users (keeper,
till) with invented passwords, and a two-line text file
as the object payload — all on loopback, no real
organisation, person, or network anywhere in the lab.