Jump toUpdate content
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.
When you create your NATS namespace, you next need to create credentials. On the NATS side, your namespace is the equivalent of an ‘account’, and your 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 namespace, but does not enable you to generate new users with specific right or fine-grained permissions.
All further actions related to publishing, processing and managing messages, subjects and streams can be done via one of the following tools:
NATS has a wide range of language compatibility:
|Java||nats.java, javadoc, examples|
|C#||nats.net, doxygen, package|
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:
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.