Firstly, thanks for the updates to this module, just trying it out.

I found one issue with the custom exchange declaration and items not added to the queue.
It looks like they're added to the queue from the log, but actually not added

Sample rabbitmq.config.yml

exchanges:
  my_exchange:
    type: direct
    passive: false
    durable: true
    auto_delete: false
    internal: false
    nowait: false
queues:
  my_queue:
    passive: false
    durable: false
    exclusive: false
    auto_delete: false
    nowait: false
    routing_keys:
      - my_exchange.my_queue

and settings.php

$settings['queue_service_my_queue'] = 'queue.rabbitmq.default';

Add to queue with the equivalent of:

    $queueName = 'my_queue';
    $data = ['hello' => 'world'];
    $queueFactory = \Drupal::service('queue.rabbitmq');
    /* @var \Drupal\rabbitmq\Queue\Queue $queue */
    $queue = $queueFactory->get($queueName);
    $queue->createItem($data);

And see the log:

[rabbitmq] Item sent to queue my_queue

But no queue items in drush rqqi or the rabbitmq server

rabbitmqctl -p my_vhost list_queues
Timeout: 60.0 seconds ...
Listing queues for vhost my_vhost ...
name	messages
my_queue	0

For this case, it appears after debug, the item cannot be added to the queue, as the bind is using an incorrect parameter in QueueBase.php

e.g in this patch https://www.drupal.org/files/issues/2018-10-01/rabbitmq-first_routing_ke... there is a $key parameter, but it's missing in the current module/

Will add the patch shortly.

Comments

davidwhthomas created an issue. See original summary.

davidwhthomas’s picture

Status: Active » Needs review
StatusFileSize
new672 bytes

Patch attached

davidwhthomas’s picture

Issue summary: View changes
davidwhthomas’s picture

Issue summary: View changes
davidwhthomas’s picture

Issue summary: View changes

zach.bimson’s picture

Status: Needs review » Fixed

Thanks for this and sorry for the delay.

I've committed this to both 2.x and 3.x

FYI I'm dropping new feature support (only bug fixes) for 8.x-2.x after D9 is released, please only use 8.x-2.x if you need Drush 8!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.