Documentation Home »Administrator Guide »Operational Structure »Message Queue »RabbitMQ Transport (via AmqpOroMessageQueue Bundle)
current version

RabbitMQ Transport (via AmqpOroMessageQueue Bundle)

The bundle registers AmqpTransportFactory.

AMQP (RabbitMQ) Transport

RabbitMQ provides better and faster messages delivery as opposed to DBAL. It is recommended to use RabbitMQ, if possible.


The config settings for the default RabbitMQ Access Control settings (a user named guest with the default password of guest, granted full access to the / virtual host) are the following:

# app/config/config.yml

    default: 'amqp'
        host: 'localhost'
        port: '5672'
        user: 'guest'
        password: 'guest'
        vhost: '/'

We can also move the specified options to the parameters.yml:

# app/config/config.yml

        default: '%message_queue_transport%'
        '%message_queue_transport%': '%message_queue_transport_config%'
    client: ~
# app/config/parameters.yml

    message_queue_transport: 'amqp'
    message_queue_transport_config: { host: 'localhost', port: '5672', user: 'guest', password: 'guest', vhost: '/' }

RabbitMQ installation

You need to have RabbitMQ version 3.6.* installed to use the AMQP transport. To install the RabbitMQ you should follow the download and installation manual.

After the installation, please check that you have all the required plugins installed and enabled.

RabbitMQ plugins

Required plugins

Plugin name Version Appointment
rabbitmq_del ayed_message _exchange 0.0.1 A plugin that adds delayed-messa ging (or scheduled-mes saging) to RabbitMQ. See also

The plugin rabbitmq_delayed_message_exchange is necessary for the proper work but it is not installed by default, so you need to download, install and enable it.

To download it, use the following command:

curl > {RABBITMQ_HOME}/plugins/rabbitmq_delayed_message_exchange-0.0.1.ez

To enable it, use the following command:

rabbitmq-plugins enable --offline rabbitmq_delayed_message_exchange

Plugins management

To enable plugins, use the rabbitmq-plugins tool: rabbitmq-plugins enable plugin-name

And to disable plugins again, use: rabbitmq-plugins disable plugin-name

To see the list of enabled plugins, use: rabbitmq-plugins list  -e

You will see something like:

[e*] amqp_client                       3.6.5
[e*] mochiweb                          2.13.1
[E*] rabbitmq_delayed_message_exchange 0.0.1
[E*] rabbitmq_management               3.6.5
[e*] rabbitmq_management_agent         3.6.5
[e*] rabbitmq_web_dispatch             3.6.5
[e*] webmachine                        1.10.3

The sign [E*] means that the plugin was explicitly enabled, i.e. somebody enabled it manually. The sign [e*] means the plugin was implicitly enabled, i.e. enabled automatically as it was required for a different enabled plugin.

More about RabbitMQ plugins

More about RabbitMQ plugins management


The following exception

Broken pipe or closed connection

might be caused by one of the following reasons:

  • The plugin rabbitmq_delayed_message_exchange is missing.
  • The RabbitMQ version is too old (older than 3.5.8).

RabbitMQ Useful Hints

  • You can see the RabbitMQ default web interface here, if the rabbitmq_management plugin is enabled: http://localhost:15672/. See more details here.
  • You can temporary stop RabbitMQ by running the command rabbitmqctl stop_app. The command will stop the RabbitMQ application, leaving the Erlang node running. You can resume it with the command rabbitmqctl start_app. See more details here.