PAIR
Direct one-to-one communication between two peers.
The Scalability Protocols
nanomsg is a family of lightweight messaging protocols for building distributed systems. Start with the communication pattern you need; choose the implementation that fits your language.
Protocol first
Each protocol describes how peers exchange messages. Implementations share this model, letting you make a deliberate choice about language, API, and lifecycle without losing sight of the topology.
Direct one-to-one communication between two peers.
Publish messages to every interested subscriber.
Route requests to services and receive replies.
Distribute work and aggregate messages.
Exchange messages in a simple many-to-many mesh.
Ask many peers a question and collect their answers.
Choose your implementation
Preferred for C
A modern C implementation with an updated API, broad transport support, and compatibility help for existing nanomsg applications.
Read the NNG documentationPreferred pure Go implementation
A native Go implementation of the protocol family, built for Go applications rather than as a wrapper around a C library.
Read the Go API documentationLegacy C API
The original C implementation. It remains available for existing applications and the language bindings built around its stable API.
Browse the legacy documentationOpen source