Icon for NATS

NATS

NATS is a high-performance messaging system for distributed architectures, supporting pub/sub, request-reply, and queue groups. JetStream adds optional persistence with at-least-once delivery guarantees.

Screenshot of NATS website

NATS is a cloud-native messaging system that serves as a connective backbone for modern distributed systems. It unifies communication across cloud, on-premise, edge, and IoT environments with a focus on simplicity, performance, and reliability.

Core messaging patterns

NATS supports three primary communication patterns:

Publish-subscribe (pub/sub) — One-to-many message distribution. Publishers send messages to subjects without knowing about subscribers. Multiple subscribers can receive the same message, enabling fan-out scenarios like telemetry broadcasting or event notification.

Request-reply — Synchronous request-response pattern built on top of pub/sub. Clients send requests to a subject and wait for responses, enabling service-to-service RPC without additional infrastructure.

Queue groups — Load-balanced message distribution among multiple consumers. Messages sent to a queue group are delivered to only one subscriber, enabling horizontal scaling of worker pools.

JetStream persistence

JetStream extends NATS with persistence capabilities:

  • Streams — Durable message storage with configurable retention policies (limits, interest, or time-based)
  • At-least-once delivery — Guaranteed message delivery with acknowledgments
  • Exactly-once semantics — Deduplication for scenarios requiring strict processing guarantees
  • Key-value store — Distributed key-value storage built on streams
  • Object store — Large object storage for files and binary data
  • Consumer groups — Flexible consumption patterns including pull-based consumers

Deployment options

NATS supports diverse deployment scenarios:

  • Single binary — Single Go binary with no external dependencies
  • Docker — Official images for containerized deployments
  • Kubernetes — Helm charts and operators for K8s-native deployments
  • Cloud services — Managed offerings via Synadia and cloud providers
  • Edge/IoT — Lightweight footprint suitable for resource-constrained devices

Security features

  • Authentication — Token, username/password, TLS certificate, and JWT-based auth
  • Authorization — Subject-level permissions and account isolation
  • TLS encryption — Full TLS support for all connections
  • NKeys — Ed25519-based public key authentication
  • Accounts — Multi-tenancy support with isolated namespaces

Protocol support

  • NATS protocol — Native text-based protocol optimized for performance
  • WebSocket — Browser and mobile connectivity
  • MQTT — MQTT 3.1.1 support for IoT device compatibility
  • gRPC — Integration with gRPC services

Use cases in manufacturing

  • Unified namespace — Central message bus for plant-wide data integration
  • OT/IT bridge — Securely connect operational technology to IT systems
  • Edge computing — Lightweight messaging for edge gateways and devices
  • Microservices — Service mesh alternative for manufacturing applications
  • Event sourcing — Persistent event streams for audit trails and replay

Limitations

  • MQTT gateway support is limited to MQTT 3.1.1 — no MQTT 5.0 yet
  • JetStream persistence is newer and less battle-tested than Kafka's log storage at extreme scale
  • Smaller ecosystem of pre-built connectors compared to Kafka Connect
  • No built-in stream processing engine (unlike Kafka Streams or Flink) — requires external tools
  • Subject-based routing is simpler than RabbitMQ's exchange/binding model, limiting complex routing patterns

Client libraries

Official clients available for 40+ languages including Go, Python, JavaScript, Java, C#, Rust, and C.

Share:

Kind
Software
Vendor
Synadia (primary maintainer)
License
Open Source
Website
nats.io
Deployment TypeLanguageLicenseMessagingProtocol
Show all
Ad
Icon

 

  
 

Similar to NATS

Icon

 

  
  
Icon

 

  
  
Icon