Advertising sustains the DA. Ads are hidden for members. Join today

On this page

Installation

Last updated on
17 February 2024

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Installation

The Drupal RabbitMQ modules requires the php-amqplib library to run.
Download the source code from https://github.com/videlalvaro/php-amqplib/tree/v1.0
Extract the source at either sites/all/modules/rabbitmq/php-amqplib or sites/all/libraries/php-amqplib. Rabbit will otherwise fail if it can't find the libraries it needs.

You'll need provide connection credentials in the form of an array using either Drupal's
$conf global variable in settings.php or using variable_set(). E.g.

Option 1. Define in settings.php.

    global $conf;
    $conf['rabbitmq_credentials'] = array(
      'host' => 'localhost',
      'port' => 5672,
      'username' => 'guest',
      'password' => 'guest',
    );

Option 2. Manually set one time with variable_set().

    variable_set('rabbitmq_credentials', array(
      'host' => 'localhost',
      'port' => 5672,
      'username' => 'guest',
      'password' => 'guest',
    ));

Set RabbitMQ as the queing system for the queues you want RabbitMQ
to maintain:

  // Set all queues to use RabbitMQ
  variable_set('queue_default_class', 'RabbitMQQueue');

or

  // Set a specific queue.
  variable_set('queue_class_<queue_name>', 'RabbitMQQueue');

Help improve this page

Page status: No known problems

You can: