# Summary As per a recent customer issue, our guidance on `MINIO_DOMAIN` and path/virtual bucket lookups needs some attention. There are two main areas to address: 1. We need to guide users to avoid namespace collision within the `MINIO_DOMAIN` , as this causes bucket lookup issues with certain MinIO services/features 2. We need to generally improve docs on setting `MINIO_DOMAIN` correctly There is also a side objective from Engineering to ensure we have a simple admonition to direct users to test wherever possible changes to config settings before applying to production. --------- Co-authored-by: Daryl White <53910321+djwfyi@users.noreply.github.com>
8.3 KiB
MQTT Notification Settings
minio
Table of Contents
This page documents settings for configuring an MQTT service as a
target for Bucket Notifications <minio-bucket-notifications>
.
See minio-bucket-notifications-publish-mqtt
for a tutorial
on using these settings.
Multiple MQTT Targets
You can specify multiple MQTT service endpoints by appending a unique
identifier _ID
for each set of related MQTT settings to the
top level key. For example, the following commands set two distinct MQTT
service endpoints as PRIMARY
and SECONDARY
,
respectively:
Environment Variables
set MINIO_NOTIFY_MQTT_ENABLE_PRIMARY="on"
set MINIO_NOTIFY_MQTT_BROKER_PRIMARY="tcp://user:password@mqtt-endpoint.example.net:1883"
set MINIO_NOTIFY_MQTT_ENABLE_SECONDARY="on"
set MINIO_NOTIFY_MQTT_BROKER_SECONDARY="tcp://user:password@mqtt-endpoint.example.net:1883"
Configuration Setting
mc admin config set notify_mqtt:primary \
broker="tcp://endpoint:port" \
topic="minio/bucket-name/events/" \
username="username" \
password="password" \
[ARGUMENT="VALUE"] ... \
mc admin config set notify_mqtt:secondary \
broker="tcp://endpoint:port" \
topic="minio/bucket-name/events/" \
username="username" \
password="password" \
[ARGUMENT="VALUE"] ... \
With these settings, MINIO_NOTIFY_MQTT_ENABLE_PRIMARY <MINIO_NOTIFY_MQTT_ENABLE>
indicates the environment variable is associated to an MQTT service
endpoint with an ID of PRIMARY
.
Settings
Enable
Required
Environment Variable
MINIO_NOTIFY_MQTT_ENABLE
Specify on
to enable publishing bucket notifications to
an MQTT endpoint.
Defaults to off
.
Configuration Setting
notify_mqtt
The top-level configuration key for defining an MQTT server/broker
endpoint for use with MinIO bucket notifications <minio-bucket-notifications>
.
Use mc admin config set
to set or update an MQTT
server/broker endpoint. The following arguments are required
for each endpoint:
~notify_mqtt.broker
~notify_mqtt.topic
~notify_mqtt.username
Optional if MQTT server/broker does not enforce authentication/authorization~notify_mqtt.password
Optional if MQTT server/broker does not enforce authentication/authorization
Specify additional optional arguments as a whitespace
(" "
)-delimited list.
mc admin config set notify_mqtt \
broker="tcp://endpoint:port" \
topic="minio/bucket-name/events/" \
username="username" \
password="password" \
[ARGUMENT="VALUE"] ... \
Broker
Required
Environment Variable
MINIO_NOTIFY_MQTT_BROKER
Configuration Setting
notify_mqtt broker
Specify the MQTT server/broker endpoint. MinIO supports TCP, TLS, or Websocket connections to the server/broker URL. For example:
tcp://mqtt.example.net:1883
tls://mqtt.example.net:1883
ws://mqtt.example.net:1883
Topic
Required
Environment Variable
MINIO_NOTIFY_MQTT_TOPIC
Configuration Setting
notify_mqtt topic
Specify the name of the MQTT topic to associate with events published by MinIO to the MQTT endpoint.
Username
Required if the MQTT server/broker enforces authentication/authorization
Environment Variable
MINIO_NOTIFY_MQTT_USERNAME
Configuration Setting
notify_mqtt username
Specify the MQTT username MinIO should use to authenticate to the MQTT server/broker.
Password
Required if the MQTT server/broker enforces authentication/authorization
Environment Variable
MINIO_NOTIFY_MQTT_PASSWORD
Configuration Setting
notify_mqtt password
Specify the password for the MQTT username MinIO uses to authenticate to the MQTT server/broker.
RELEASE.2023-06-23T20-26-00Z
MinIO redacts this value when returned as part of mc admin config get
.
Quality of Service
Optional
Environment Variable
MINIO_NOTIFY_MQTT_QOS
Configuration Setting
notify_mqtt qos
Specify the Quality of Service priority for the published events.
Defaults to 0
.
Keep Alive Interval
Optional
Environment Variable
MINIO_NOTIFY_MQTT_KEEP_ALIVE_INTERVAL
Configuration Setting
notify_mqtt keep_alive_interval
Specify the keep-alive interval for the MQTT connections. MinIO supports the following units of time measurement:
s
- seconds, "60s"m
- minutes, "60m"h
- hours, "24h"d
- days, "7d"
Reconnect Interval
Optional
Environment Variable
MINIO_NOTIFY_MQTT_RECONNECT_INTERVAL
Configuration Setting
notify_mqtt reconnect_interval
Specify the reconnect interval for the MQTT connections. MinIO supports the following units of time measurement:
s
- seconds, "60s"m
- minutes, "60m"h
- hours, "24h"d
- days, "7d"
Queue Directory
Optional
Environment Variable
MINIO_NOTIFY_MQTT_QUEUE_DIR
Configuration Setting
notify_mqtt 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 MQTT server/broker is offline and replays the stored events when connectivity resumes.
Queue Limit
Optional
Environment Variable
MINIO_NOTIFY_MQTT_QUEUE_LIMIT
Configuration Setting
notify_mqtt queue_limit
Specify the maximum limit for undelivered messages. Defaults to
100000
.
Comment
Optional
Environment Variable
MINIO_NOTIFY_MQTT_COMMENT
Configuration Setting
notify_mqtt comment
Specify a comment to associate with the MQTT configuration.