NATS Notification Settings
NATS Streaming Deprecated
NATS Streaming is deprecated. Migrate to JetStream instead.
The related MinIO configuration options and environment variables are deprecated.
This page documents settings for configuring an NATS service as a target for Bucket Notifications. See Publish Events to NATS for a tutorial on using these settings.
You can establish or modify settings by defining:
an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
a configuration setting using
mc admin config set
.a configuration setting using the MinIO Console’s Administrator > Settings pages.
If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.
Some settings have only an environment variable or a configuration setting, but not both.
Important
Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.
Multiple NATS Targets
You can specify multiple NATS service endpoints by appending a unique identifier _ID
for each set of related NATS settings on to the top level key.
Example
For example, the following commands set two distinct NATS service endpoints as PRIMARY
and SECONDARY
respectively:
set MINIO_NOTIFY_NATS_ENABLE_PRIMARY="on"
set MINIO_NOTIFY_NATS_ADDRESS_PRIMARY="nats-endpoint.example.net:4222"
set MINIO_NOTIFY_NATS_ENABLE_SECONDARY="on"
set MINIO_NOTIFY_NATS_ADDRESS_SECONDARY="nats-endpoint.example.net:4222"
With these settings, MINIO_NOTIFY_NATS_ENABLE_PRIMARY
indicates the environment variable is associated to an NATS service endpoint with ID of PRIMARY
.
mc admin config set notify_nats:primary \
address="nats-endpoint.example.com:4222" \
subject="minioevents" \
[ARGUMENT=VALUE ...]
mc admin config set notify_nats:secondary \
address="nats-endpoint.example.com:4222" \
subject="minioevents" \
[ARGUMENT=VALUE ...]
Settings
Enable
Required
Specify on
to enable publishing bucket notifications to an NATS service endpoint.
Defaults to off
.
The top-level configuration key for defining an NATS service endpoint for use with MinIO bucket notifications.
Use mc admin config set
to set or update an NATS service endpoint.
The address
and subject
arguments are required for each target.
Specify additional optional arguments as a whitespace (" "
)-delimited list.
mc admin config set notify_nats \
address="nats-endpoint.example.com:4222" \
subject="minioevents" \
[ARGUMENT="VALUE"] ... \
Address
Required
Specify the NATS service endpoint to which MinIO publishes bucket events.
For example, nats-endpoint.example.com:4222
.
Changed in version RELEASE.2023-05-27T05-56-19Z: MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.
Subject
Required
Specify the subscription to which MinIO associates events published to the NATS endpoint.
Username
Optional
Specify the username for connecting to the NATS service endpoint.
Password
Optional
Specify the passport for connecting to the NATS service endpoint.
Changed in version RELEASE.2023-06-23T20-26-00Z: MinIO redacts this value when returned as part of mc admin config get
.
Token
Optional
Specify the token for connecting to the NATS service endpoint.
Changed in version RELEASE.2023-06-23T20-26-00Z: MinIO redacts this value when returned as part of mc admin config get
.
User Credentials File
Optional
Specify the to the user credentials file <https://docs.nats.io/using-nats/developer/connecting/creds> to use to connect to the NATS service endpoint.
TLS
Optional
Specify on
to enable TLS connectivity to the NATS service endpoint.
TLS Skip Verify
Optional
Enables or disables TLS verification of the NATS service endpoint TLS certificates.
Specify
on
to disable TLS verification (Default).Specify
off
to enable TLS verification.
Ping Interval
Optional
Specify the duration interval for client pings to the NATS server. MinIO supports the following time units:
s
- seconds,"60s"
m
- minutes,"5m"
h
- hours,"1h"
d
- days,"1d"
Jetstream
Optional
Specify on
to enable JetStream support for streaming events to a NATS JetStream service endpoint.
Streaming
Deprecated
Optional
Specify on
to enable asynchronous publishing of events to the NATS service endpoint.
Streaming Async
Deprecated
Optional
Specify on
to enable asynchronous publishing of events to the NATS service endpoint.
Max ACK Responses In Flight
Deprecated
Optional
Specify the number of messages to publish without waiting for an ACK response from the NATS service endpoint.
Streaming Cluster ID
Deprecated
Optional
Specify the unique ID for the NATS streaming cluster.
Client Cert
Optional
Specify the path to the client certificate to use for performing mTLS authentication to the NATS service endpoint.
Client Key
Optional
Specify the path to the client private key to use for performing mTLS authentication to the NATS service endpoint.
Queue Directory
Optional
Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events
.
MinIO stores undelivered events in the specified store while the NATS server/broker is offline and replays the stored events when connectivity resumes.
Queue Limit
Optional
Specify the maximum limit for undelivered messages.
Defaults to 100000
.
Comment
Optional
Specify a comment to associate with the NATS configuration.