Messaging
Managed NATS on your own cluster
Message queue and streaming for background jobs and events, with JetStream so messages survive a restart.
Created inside a project, beside the apps that use it. Each project gets its own instance, storage and credentials.
01What it does
NATS, run for you
NATS on the vendor's chart, with JetStream on.
A small, fast server for background jobs, events and pub/sub. JetStream keeps messages that have not been consumed yet on disk, so a restart does not lose them, and the disk you give it is sized for exactly that.
Bound apps get the URL beside the host, port, username and password. The client port can be opened on a public cluster for consumers that run elsewhere.
02Options
What you choose
What the console asks when you create it, in the catalog's own numbers. Anything marked chosen once cannot change without creating a new instance.
- Storage
- 10Gi by default for unconsumed messages, chosen once
- Public port
- 4222 can be opened on a public cluster
- Pause
- No; pause the project instead
03Binding
What your app receives
Bind it to an app and these arrive as environment variables. The values are generated once into a secret and reach the app from there, rather than as something you copy.
- NATS_HOST
- NATS_PORT
- NATS_USERNAME
- NATS_PASSWORD
- NATS_URL
04Adding it
Add NATS to a project
The same four steps as every service in the catalog.
- 01Open a project and go to Services.
- 02Pick it from the catalog and choose its options. Only the size is required; everything else has a default.
- 03Create it. Anyport installs it into the project's namespace, generates its credentials into a secret there, and tracks its health.
- 04Bind it to an app. The connection details arrive as environment variables, and rotating the credential never means editing an app.