NATS Logo by Example

Learn NATS by Example

An evolving collection of runnable, cross-client reference examples for NATS.

$ nbe run messaging/pub-sub/{cli,go,rust,python,deno,...}
Check out the 6m intro video, read the getting started guide, or just start browsing the examples below 👇!
Sign-up for the NATS Weekly Newsletter to get all the updates!


Examples showcasing various deployment topologies NATS supports including clusters, superclusters, and leaf nodes.

Use Cases

Cross-functional examples satisfying a use case.


A layer on top of JetStream for utilizing a stream as a key-value store.


The NATS server can be embedded in the Go language.


Examples of various integrations with NATS.