Skip to content
Drydock
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 varRequiredDescriptionSupported valuesDefault value when missing
DD_NOTIFICATION_AMQP_{trigger_name}_URL🔴The broker connection url, credentials includedamqp:// 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 durableAny stringempty
DD_NOTIFICATION_AMQP_{trigger_name}_EXCHANGETYPE⚪Type used when asserting a named exchangedirect, topic, fanout, headerstopic
DD_NOTIFICATION_AMQP_{trigger_name}_ROUTINGKEY⚪Routing key of each messageAny stringdrydock-container
DD_NOTIFICATION_AMQP_{trigger_name}_PERSISTENT⚪Ask the broker to persist messagestrue, falsetrue
DD_NOTIFICATION_AMQP_{trigger_name}_DISABLETITLE⚪Send an empty title fieldtrue, falsefalse
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