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_queueand 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | fix-rabbitmq-queue-exchange-binding-3142811-2.patch | 672 bytes | davidwhthomas |
Comments
Comment #2
davidwhthomas commentedPatch attached
Comment #3
davidwhthomas commentedComment #4
davidwhthomas commentedComment #5
davidwhthomas commentedComment #8
zach.bimson commentedThanks 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!