Closed aashikam closed 5 months ago
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
- Reason/Regression - The issue has introduced a regression.
- Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
- Reason/Complex - Issue occurred due to complex scenario.
- Reason/Invalid - Issue is invalid.
- Reason/Other - None of the above cases.
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: