[Bug] [RabbitMQ] rabbitmq:Listener trying to re-declare the queue internally with mismatching settings #6629
Labels
module/rabbitmq
Points/0.5
Reason/Other
None of the other reasons.
Team/PCM
Protocol connector packages related issues
Type/Bug
Description:
RabbitMQ listener queue declare existing functionality is based on the assumption that the queue already exists in the server at the time the listener subscribes to it, otherwise it will declare that queue with default settings. Declaration with default settings was added as RabbitMQ claims that the queue declare function is idempotent and does not re-declare existing queues. But the observed behavior in a recent issue is that it will raise an error if there is a mismatch between the existing queue and the queue that is re-declared.
Steps to reproduce:
Declare a durable = true queue in the RabbitMQ server named for example "demo"
Try to listen to it with the service config:
API changes/additions:
There are two approaches to fix the issue:
Existing client API:
Change to service config:
Going with the second approach.
Sample usage:
The text was updated successfully, but these errors were encountered: