Documentation

AMQP Notification Settings

This page documents settings for configuring an AMQP service as a target for Bucket Notifications. See Publish Events to AMQP (RabbitMQ) 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 AMQP Targets

You can specify multiple AMQP service endpoints by appending a unique identifier _ID for each set of related AMQP settings to the top level key.

Examples

For example, the following commands set two distinct AMQP service endpoints as PRIMARY and SECONDARY respectively:

set MINIO_NOTIFY_AMQP_ENABLE_PRIMARY="on"
set MINIO_NOTIFY_AMQP_URL_PRIMARY="amqp://user:password@amqp-endpoint.example.net:5672"

set MINIO_NOTIFY_AMQP_ENABLE_SECONDARY="on"
set MINIO_NOTIFY_AMQP_URL_SECONDARY="amqp://user:password@amqp-endpoint.example.net:5672"

For example, MINIO_NOTIFY_AMQP_ENABLE_PRIMARY indicates the environment variable is associated to an AMQP service endpoint with ID of PRIMARY.

mc admin config set notify_amqp:primary \
   url="user:password@amqp://amqp-endpoint.example.net:5672" [ARGUMENT=VALUE ...]

mc admin config set notify_amqp:secondary \
   url="user:password@amqp://amqp-endpoint.example.net:5672" [ARGUMENT=VALUE ...]

Notice that for configuration settings, the unique identifier appends to amqp only, not to each individual argument.

Settings

Enable

MINIO_NOTIFY_AMQP_ENABLE

Requires specifying MINIO_NOTIFY_AMQP_URL if set to on.

Specify on to enable publishing bucket notifications to an AMQP endpoint.

Defaults to off.

notify_amqp

The top-level configuration key for defining an AMQP service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an AMQP service endpoint. The url argument is required for each target. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_amqp \
  url="amqp://user:password@endpoint:port" \
  [ARGUMENT="VALUE"] ...

URL

Required

MINIO_NOTIFY_AMQP_URL
notify_amqp url

Specify the AMQP server endpoint to which MinIO publishes bucket events. For example, amqp://myuser:mypassword@localhost:5672.

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.

Exchange

Optional

MINIO_NOTIFY_AMQP_EXCHANGE
notify_amqp exchange

Specify the name of the AMQP exchange to use.

Exchange Type

Optional

MINIO_NOTIFY_AMQP_EXCHANGE_TYPE
notify_amqp exchange_type

Specify the type of the AMQP exchange.

Routing Key

Optional

MINIO_NOTIFY_AMQP_ROUTING_KEY
notify_amqp routing_key

Specify the routing key for publishing events.

Mandatory

Optional

MINIO_NOTIFY_AMQP_MANDATORY
notify_amqp mandatory

Specify off to ignore undelivered messages errors. Defaults to on.

Durable

Optional

MINIO_NOTIFY_AMQP_DURABLE
notify_amqp durable

Specify on to persist the message queue across broker restarts. Defaults to off.

No Wait

Optional

MINIO_NOTIFY_AMQP_NO_WAIT
notify_amqp no_wait

Specify on to enable non-blocking message delivery. Defaults to off.

Internal

Optional

MINIO_NOTIFY_AMQP_INTERNAL
notify_amqp internal

Specify on to use the exchange only if it is bound to other exchanges. See the RabbitMQ documentation on Exchange to Exchange Bindings for more information on AMQP exchange binding.

Auto Deleted

Optional

MINIO_NOTIFY_AMQP_AUTO_DELETED
notify_amqp auto_deleted

Specify on to automatically delete the message queue if there are no consumers. Defaults to off.

Delivery Mode

Optional

MINIO_NOTIFY_AMQP_DELIVERY_MODE
notify_amqp delivery_mode

Specify 1 for set the delivery mode to non-persistent queue.

Specify 2 to set the delivery mode to persistent queue.

Queue Directory

Optional

MINIO_NOTIFY_AMQP_QUEUE_DIR
notify_amqp 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 AMQP service is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_AMQP_QUEUE_LIMIT
notify_amqp queue_limit

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

Comment

Optional

MINIO_NOTIFY_AMQP_COMMENT
notify_amqp comment

Specify a comment for the AMQP configuration.