Shovel

Shovel is a plugin for RabbitMQ that enables you to define replication relationships between brokers. It can for example be used to balance the load of a queue or when you need to be able to take messages out of one RabbitMQ broker, and insert them into another.

The shovel plugin allows you to configure a number of shovels, which start automatically when the broker starts. Each shovel that is created connects to the source broker and the destination broker. The shovel can be configured to simply consume messages from a queue on one broker, and forward them to an exchange on another.

Imagen that you have a CloudAMQP instance with very high load on queue A. In that case you can create a shovel and configure it to consume the messages from queue A and republish them to an exchange in another CloudAMQP instance. Another use case for when the shovel plugin can be used is when a new instance is created and you need to move all messages from an one old queue on an old instance to another queue on a new instance.

Set up a shovel

A shovel can be created from the RabbitMQ management interface. Go to the admin tab and press Shovel Management.

Shovel plugin with RabbitMQ

The image below show a simple example where all the messages that are published to the exchange on the the CloudAMQP instance will be copied to the RabbitMQ exchange set up on localhost.

Syntax of the URI should be amqp://username:password@host:port/vhost

  • Virtual host: Any vhost chosen
  • Name: The name of the shovel
  • Source: URI of the source instance. This should be the full CloudAMQP URI
  • Destination: URI of the destination instance.

Shovel plugin with RabbitMQ

More information about RabbitMQ shovel is available from RabbitMQ.com