OSS TanbouSign in with GitHub

use Core NATS Pub/Sub and persistent JetStream messaging through one Go client

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
6,770
Primary language
Go
License
Apache-2.0
Repository last updated
Oct 6, 2026
On this page

Overview

nats.go is the official Go client for NATS. It provides Core NATS publish/subscribe, request/reply, queue subscriptions, JetStream stream and consumer management, persistent publish/consume, TLS, NKeys and user credentials, and reconnect handling.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Build service messaging with Pub/Sub, request/reply, and queue subscriptions

Core NATS APIs cover publishing, asynchronous and synchronous subscriptions, request/reply, channel subscriptions, and graceful drain behavior over subject-based messaging.

Sources: [2]

Manage persistent streams and consumers with JetStream

The JetStream API exposes stream and consumer handles for persistent publishing, consumption, acknowledgements, and consumer lifecycle control.

Sources: [2]

Best fit

Fits cloud-native backends mixing low-latency Pub/Sub with durable messaging

Core NATS can cover service request/reply and event distribution while JetStream adds replay and durability in the same client ecosystem.

Sources: [2]

Before adoption

v1.54.0 raises the minimum to Go 1.26; regression-test reconnect and consumer behavior

Version 1.54.0 raises the minimum Go version to 1.26 and adds nats-server v2.15 stream and consumer information fields. The release fixes JetStream iterators after reconnects, ordered-consumer message loss and subscription resurrection, plus a Core subscription SID race, so reconnects, drains, pending limits, and ordered consumers need regression coverage.

Sources: [3][4][2]

Official sources

  1. [1]nats-io/nats.go — GitHub repository(2026-10-06)
  2. [2]NATS Go Client v1.54.0 — README(2026-10-06)
  3. [3]NATS Go Client v1.54.0 — go.mod(2026-10-06)
  4. [4]NATS Go Client v1.54.0 release(2026-10-06)
  5. [5]NATS Go Client Apache-2.0 license(2026-10-06)
Supplemental curator note

One client covers lightweight Core NATS Pub/Sub and persistent JetStream messaging. Reconnects, draining, subscription pending limits, and JetStream acknowledgements or consumer lifecycles affect message loss and duplicates, so test failure scenarios explicitly.

Try it in 3 steps

  1. 1

    Get the source

    git clone --depth 1 https://github.com/nats-io/nats.go.git
  2. 2

    Enter the repository

    cd nats.go
  3. 3

    Check the official steps

    Continue with the commands in the README Installation, Quick Start, or Getting Started section.

    find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Check the official README

Growth

Growth trends · Last 30 days

6,770 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
25
Open PRs
46

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • go
  • golang
  • nats
  • microservices
  • microservices-architecture
  • pub-sub
  • cloud-native
  • cloud-native-architectures
  • cloud-native-microservices
Stars
6,770
Forks
839
Watchers
155
Open issues
120
Contributors
156
Owner type
Organization
Primary language
Go
License
Apache-2.0
Repository last updated
Oct 6, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?