NATS (nats-py for Python)
also: NATS messaging · nats-py · NATS JetStream
An open-source messaging system where apps publish and subscribe by subject through a server, with JetStream adding persistence; nats-py is its Python client.
Applications exchange messages by subject, a named channel, so they do not need each other's network addresses. Components publish and listen for messages without being directly connected to one another. NATS also supports request and reply, and queue groups for load-balancing across workers. The server is a single nats-server binary, and the project lists Python among its official clients.
Core NATS is fire-and-forget: it delivers only to subscribers connected at publish time, with no replay. JetStream is the persistence layer. A stream stores messages for one or more subject patterns, in memory or on disk, and a consumer is a server-side view of a stream that tracks its own position. Clients acknowledge messages, and an unacknowledged message is redelivered, which gives at-least-once delivery. A consumer can replay from the start of a stream, from a sequence number, or from a point in time.
In Python, nats-py is an asyncio client installed with pip install nats-py. A service calls nats.connect, then subscribe on a subject with a callback, then publish with bytes; nc.request waits for a reply with a timeout, and nc.drain closes the connection cleanly. JetStream is reached through nc.jetstream(), which supports streams, pull and push consumers, durable subscriptions, and ordered consumers.
Where it bites: plain publish and subscribe keeps nothing for a subscriber that is offline, so anything that must survive a restart needs JetStream. The nats-py README warns that the public demo server is shared with other users and recommends running your own server.
Founder takeaway
Decide up front which messages must survive a restart, because those need JetStream streams and acknowledgments rather than plain publish and subscribe.
sources
engineer review pending