Jump toSuggest an edit

NATS Overview

Reviewed on 09 April 2024Published on 04 January 2023

What is NATS?

NATS (Neural Autonomic Transport System) is a messaging system that aims to be simple to use, scalable and provide high performance. It implements a publish/subscribe model as well as adding a streaming service via JetStream. A stream is a persistent, time-ordered list of messages which can be read sequentially by consumers. A consumer can be thought of as a “cursor” in the stream, consuming the stream’s messages according to their “subject filter” or “replay policy”. With NATS, you would typically implement a queue as a stream with a single consumer to read from.

NATS is a Cloud Native Computing Foundation project supported by a strong community, and can also be integrated in a Kubernetes cluster.

NATS accounts

You can easily create a NATS account from the Scaleway console, via the Scaleway API or via Terraform.

NATS credentials

When you create your NATS account, you next need to create credentials. On the NATS side, these credentials are the equivalent of a ‘user’. We configured Scaleway Messaging and Queuing to use the most secure connection type offered by NATS: NKeys. NKeys are a public-key signature system based on Ed25519.

Your credentials are provided in the form of a downloadable .creds file. Each set of credentials gives you full access to your NATS account, but does not enable you to generate new users with specific rights or fine-grained permissions.

Further actions: NATS CLI & NATS SDK

All further actions related to publishing, processing and managing messages, subjects and streams can be done via one of the following tools:


The NATS CLI is a great tool for administrating or testing your subjects and streams. See our dedicated documentation for help getting started with the NATS CLI.


NATS has a wide range of language compatibility:

Golangnats.go, godoc, javadoc, examples, doxygen, package
JavaScriptNode.js, deno, WebSocket, doc
Rubynats-pure.rb, yard
Cnats.c, doc, doc
Elixirnats.ex, doc
PHPphpnats nats.php

Further community NATS SDKs, e.g. SwiftyNats, Kotlin and Crystal, can be found here.

The following documents may help you get started using the above SDKs:

  • Authentication with SDK
  • JavaScript: Using Jetstream
  • Python: Using Jetstream
  • Go: Using Jetstream

The main difference you will find between the standard NATS documentation and Scaleway Messaging and Queuing is that we require you to provide a specific NATS URL and credentials to access the service. Refer to our developers documentation for further information.

NATS resources

  • Official NATS Documentation: What is NATS?
  • Create a serverless architecture for handling large messages using Scaleway’s NATS, Serverless Functions, and Object Storage
  • Publish/Subscribe in pure NATS (no message retention)
  • Introduction to JetStream
  • Learn NATS by Example
  • How to use Scaleway Messaging and Queuing with the Terraform NATS Jetstream provider
Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway