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 Monthly Newsletter to get all the updates!

Topologies

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

Use Cases

Cross-functional examples satisfying a use case.

Key-Value

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

Object-Store

A layer on top of JetStream for utilizing a stream as an object store.

Embedded

The NATS server can be embedded in the Go language.

Integrations

Examples of various integrations with NATS.

Services Framework

A layer on top of core NATS for building services in a simple and consistent way.