ConfigurationActions & NotificationsAMQP
AMQP
The amqp trigger lets you publish container update events to an AMQP 0-9-1 broker such as RabbitMQ.
Pre-release docs
These docs cover v1.9, a release candidate that isn't generally available yet. Running the stable release? Read the docs for v1.7.
The amqp trigger publishes container update events as JSON messages to an AMQP 0-9-1 broker such as RabbitMQ. Drydock keeps one connection open and reconnects when the broker drops it.
Variables
| Env var | Required | Description | Supported values | Default value when missing |
|---|---|---|---|---|
DD_NOTIFICATION_AMQP_{trigger_name}_URL | 🔴 | The broker connection url, credentials included | amqp:// or amqps:// url | |
DD_NOTIFICATION_AMQP_{trigger_name}_EXCHANGE | ⚪ | Exchange to publish to. Empty publishes to the default exchange, where the routing key is the queue name. A named exchange is asserted as durable | Any string | empty |
DD_NOTIFICATION_AMQP_{trigger_name}_EXCHANGETYPE | ⚪ | Type used when asserting a named exchange | direct, topic, fanout, headers | topic |
DD_NOTIFICATION_AMQP_{trigger_name}_ROUTINGKEY | ⚪ | Routing key of each message | Any string | drydock-container |
DD_NOTIFICATION_AMQP_{trigger_name}_PERSISTENT | ⚪ | Ask the broker to persist messages | true, false | true |
DD_NOTIFICATION_AMQP_{trigger_name}_DISABLETITLE | ⚪ | Send an empty title field | true, false | false |
This trigger also supports the common configuration variables.
Message format
Each message is a JSON object. A single update carries title, message, mode set to simple, and the full container. A batch carries title, message, mode set to batch, eventKind, count and the containers array.
The url usually carries the broker password, so it is masked wherever Drydock prints the trigger configuration.
Examples
Publish to a topic exchange
services:
drydock:
image: codeswhat/drydock:1.9.0-rc.6
...
environment:
- DD_NOTIFICATION_AMQP_RABBIT_URL=amqp://user:pass@rabbitmq:5672
- DD_NOTIFICATION_AMQP_RABBIT_EXCHANGE=drydock
- DD_NOTIFICATION_AMQP_RABBIT_ROUTINGKEY=container.update