MySQL Notification Settings
This page documents settings for configuring a MYSQL service as a target for Bucket Notifications. See Publish Events to MySQL 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 AIStor Server. Refer to your operating system’s documentation for how to define an environment variable.
- a configuration setting using
mc admin config set
.
If you define both an environment variable and the similar configuration setting, AIStor uses the environment variable value.
Some settings have only an environment variable or a configuration setting, but not both.
Settings
Enable
DSN string
Specify the data source name (DSN) of the MySQL service endpoint. AIStor expects the following format:
<user>:<password>@tcp(<host>:<port>)/<database>
For example:
"username:password@tcp(mysql.example.com:3306)/miniodb"
Table
Specify the name of the MySQL table to which AIStor publishes event notifications.
Format
Specify the format of event data written to the MySQL service endpoint. AIStor supports the following values:
namespace
- For each bucket event, AIStor creates a JSON document with the bucket and object name from the event as the document ID and the actual event as part of the document body. Additional updates to that object modify the existing table entry for that object. Similarly, deleting the object also deletes the corresponding table entry.
access
- For each bucket event, AIStor creates a JSON document with the event details and appends it to the table with a MySQL-generated random ID. Additional updates to an object result in new index entries, and existing entries remain unmodified.
Max open connections
Specify the maximum number of open connections to the MySQL database.
Defaults to 2
.
Queue dir
Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events
.
AIStor stores undelivered events in the specified store while the MySQL server/broker is offline and replays the stored events when connectivity resumes.
Queue limit
Specify the maximum limit for undelivered messages. Defaults to 100000
.
Comment
Specify a comment to associate with the MySQL configuration.