Documentation

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

MINIO_NOTIFY_NATS_ENABLE

Specify on to enable publishing bucket notifications to an NATS service endpoint.

Defaults to off.

notify_nats

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

MINIO_NOTIFY_NATS_ADDRESS
notify_nats address

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

MINIO_NOTIFY_NATS_SUBJECT
notify_nats subject

Specify the subscription to which MinIO associates events published to the NATS endpoint.

Username

Optional

MINIO_NOTIFY_NATS_USERNAME
notify_nats username

Specify the username for connecting to the NATS service endpoint.

Password

Optional

MINIO_NOTIFY_NATS_PASSWORD
notify_nats password

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

MINIO_NOTIFY_NATS_TOKEN
notify_nats token

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

MINIO_NOTIFY_NATS_USER_CREDENTIALS
notify_nats user_credentials

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

MINIO_NOTIFY_NATS_TLS
notify_nats tls

Specify on to enable TLS connectivity to the NATS service endpoint.

TLS Skip Verify

Optional

MINIO_NOTIFY_NATS_TLS_SKIP_VERIFY
notify_nats tls_skip_verify

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

MINIO_NOTIFY_NATS_PING_INTERVAL
notify_nats ping_interval

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

MINIO_NOTIFY_NATS_JETSTREAM
notify_nats jetstream

Specify on to enable JetStream support for streaming events to a NATS JetStream service endpoint.

Streaming

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING
notify_nats streaming

Specify on to enable asynchronous publishing of events to the NATS service endpoint.

Streaming Async

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_ASYNC
notify_nats streaming_async

Specify on to enable asynchronous publishing of events to the NATS service endpoint.

Max ACK Responses In Flight

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_MAX_PUB_ACKS_IN_FLIGHT
notify_nats streaming_max_pub_acks_in_flight

Specify the number of messages to publish without waiting for an ACK response from the NATS service endpoint.

Streaming Cluster ID

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_CLUSTER_ID
notify_nats streaming_cluster_id

Specify the unique ID for the NATS streaming cluster.

Cert Authority

Optional

MINIO_NOTIFY_NATS_CERT_AUTHORITY
notify_nats cert_authority

Specify the path to the Certificate Authority chain used to sign the NATS service endpoint TLS certificates.

Client Cert

Optional

MINIO_NOTIFY_NATS_CLIENT_CERT
notify_nats client_cert

Specify the path to the client certificate to use for performing mTLS authentication to the NATS service endpoint.

Client Key

Optional

MINIO_NOTIFY_NATS_CLIENT_KEY
notify_nats client_key

Specify the path to the client private key to use for performing mTLS authentication to the NATS service endpoint.

Queue Directory

Optional

MINIO_NOTIFY_NATS_QUEUE_DIR
notify_nats queue_dir

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

MINIO_NOTIFY_NATS_QUEUE_LIMIT
notify_nats queue_limit

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_NATS_COMMENT
notify_nats comment

Specify a comment to associate with the NATS configuration.