Expose broker events as messages
Switch branches/tags
v3.8.0-beta.1 v3.7.9-rc.3 v3.7.9-rc.2 v3.7.9-rc.1 v3.7.8 v3.7.8-rc.4 v3.7.8-rc.3 v3.7.8-rc.2 v3.7.8-rc.1 v3.7.7 v3.7.7-rc.2 v3.7.7-rc.1 v3.7.7-beta.2 v3.7.7-beta.1 v3.7.6 v3.7.6-rc.2 v3.7.6-rc.1 v3.7.5 v3.7.5-rc.1 v3.7.5-beta.3 v3.7.5-beta.2 v3.7.5-beta.1 v3.7.4 v3.7.4-rc.4 v3.7.4-rc.3 v3.7.4-rc.2 v3.7.4-rc.1 v3.7.3 v3.7.3-rc.2 v3.7.3-rc.1 v3.7.2 v3.7.1 v3.7.1-beta.1 v3.7.0 v3.7.0-rc.2 v3.7.0-rc.1 v3.7.0-beta.20 v3.7.0-beta.19 rabbitmq_v3_7_0_milestone18 rabbitmq_v3_7_0_milestone17 rabbitmq_v3_7_0_milestone16 rabbitmq_v3_7_0_milestone15 rabbitmq_v3_7_0_milestone14 rabbitmq_v3_7_0_milestone13 rabbitmq_v3_7_0_milestone12 rabbitmq_v3_7_0_milestone11 rabbitmq_v3_7_0_milestone10 rabbitmq_v3_7_0_milestone9 rabbitmq_v3_7_0_milestone8 rabbitmq_v3_7_0_milestone7 rabbitmq_v3_7_0_milestone6 rabbitmq_v3_7_0_milestone5 rabbitmq_v3_7_0_milestone4 rabbitmq_v3_7_0_milestone3 rabbitmq_v3_7_0_milestone2 rabbitmq_v3_7_0_milestone1 rabbitmq_v3_6_16 rabbitmq_v3_6_16_rc1 rabbitmq_v3_6_15 rabbitmq_v3_6_15_rc1 rabbitmq_v3_6_15_milestone2 rabbitmq_v3_6_15_milestone1 rabbitmq_v3_6_14 rabbitmq_v3_6_13 rabbitmq_v3_6_13_rc2 rabbitmq_v3_6_13_rc1 rabbitmq_v3_6_13_milestone1 rabbitmq_v3_6_12 rabbitmq_v3_6_12_rc3 rabbitmq_v3_6_12_rc2 rabbitmq_v3_6_12_rc1 rabbitmq_v3_6_11 rabbitmq_v3_6_11_rc3 rabbitmq_v3_6_11_rc2 rabbitmq_v3_6_11_rc1 rabbitmq_v3_6_11_milestone5 rabbitmq_v3_6_11_milestone4 rabbitmq_v3_6_11_milestone3 rabbitmq_v3_6_11_milestone2 rabbitmq_v3_6_11_milestone1 rabbitmq_v3_6_10 rabbitmq_v3_6_10_rc2 rabbitmq_v3_6_10_rc1 rabbitmq_v3_6_10_milestone4 rabbitmq_v3_6_10_milestone3 rabbitmq_v3_6_10_milestone2 rabbitmq_v3_6_10_milestone1 rabbitmq_v3_6_9 rabbitmq_v3_6_8 rabbitmq_v3_6_7 rabbitmq_v3_6_7_rc3 rabbitmq_v3_6_7_rc2 rabbitmq_v3_6_7_rc1 rabbitmq_v3_6_7_milestone6 rabbitmq_v3_6_7_milestone5 rabbitmq_v3_6_7_milestone4 rabbitmq_v3_6_7_milestone3 rabbitmq_v3_6_7_milestone2 rabbitmq_v3_6_7_milestone1 rabbitmq_v3_6_6
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples/java Fix compilation error in QueueEvents Jun 7, 2016
LICENSE Initial commit Feb 6, 2014


RabbitMQ Event Exchange


This plugin exposes the internal RabbitMQ event mechanism as messages that clients can consume. It's useful if you want to keep track of certain events, e.g. when queues, exchanges, bindings, users, connections, channels are created and deleted. This plugin filters out stats events, so you are almost certainly going to get better results using the management plugin for stats.

How it Works

It declares a topic exchange called 'amq.rabbitmq.event' in the default virtual host. All events are published to this exchange with routing keys like 'exchange.created', 'binding.deleted' etc, so you can subscribe to only the events you're interested in.

The exchange behaves similarly to 'amq.rabbitmq.log': everything gets published there; if you don't trust a user with the information that gets published, don't allow them access.


With RabbitMQ 3.6.0 or Later

Most recent RabbitMQ version ships with this plugin. As of RabbitMQ 3.6.0 this plugin is included into the RabbitMQ distribution.

Enable it with the following command:

rabbitmq-plugins enable rabbitmq_event_exchange

With RabbitMQ 3.5.x

You can download a pre-built binary of this plugin from the RabbitMQ Community Plugins page.

Then run the following command:

rabbitmq-plugins enable rabbitmq_event_exchange

Event format

Each event has various properties associated with it. These are translated into AMQP 0-9-1 data encoding and inserted in the message headers. The message body is always blank.


So far RabbitMQ and related plugins emit events with the following routing keys:

RabbitMQ Broker

Queue, Exchange and Binding events:

  • queue.deleted
  • queue.created
  • exchange.created
  • exchange.deleted
  • binding.created
  • binding.deleted

Connection and Channel events:

  • connection.created
  • connection.closed
  • channel.created
  • channel.closed

Consumer events:

  • consumer.created
  • consumer.deleted

Policy and Parameter events:

  • policy.set
  • policy.cleared
  • parameter.set
  • parameter.cleared

Virtual host events:

  • vhost.created
  • vhost.deleted
  • vhost.limits.set
  • vhost.limits.cleared

User related events:

  • user.authentication.success
  • user.authentication.failure
  • user.created
  • user.deleted
  • user.password.changed
  • user.password.cleared
  • user.tags.set

Permission events:

  • permission.created
  • permission.deleted
  • topic.permission.created
  • topic.permission.deleted

Alarm events:

  • alarm.set
  • alarm.cleared

Shovel Plugin

Worker events:

  • shovel.worker.status
  • shovel.worker.removed

Federation Plugin

Link events:

  • federation.link.status
  • federation.link.removed


There is a usage example using the Java client in examples/java.


  • rabbitmq_event_exchange.vhost: what vhost should the amq.rabbitmq.event exchange be declared in. Default: rabbit.default_vhost (<<"/">>).


If you want to remove the exchange which this plugin creates, first disable the plugin and restart the broker. Then you can delete the exchange, e.g. with :

rabbitmqctl eval 'rabbit_exchange:delete(rabbit_misc:r(<<"/">>, exchange, <<"amq.rabbitmq.event">>), false).'

Building from Source

Building is no different from building other RabbitMQ plugins.


git clone https://github.com.com/rabbitmq/rabbitmq-public-umbrella.git umbrella
cd umbrella
make co
make up BRANCH=stable
cd deps
git clone https://github.com/rabbitmq/rabbitmq-event-exchange.git rabbitmq_event_exchange
cd rabbitmq_event_exchange
make dist


Released under the Mozilla Public License 1.1, the same as RabbitMQ.