I have 2 queues, I have enabled the AutomaticRecoveryEnabled
parameter set to true to allow automatic reconnection in my application.
- QueueTest is the main queue that receives messages.
- QueueTestRetry is the DLX queue that receives messages that the
consumer cannot process, for example, during an application
exception.
However, it does not work when I specify the x-dead-letter-exchange
parameters. Here is the error in the logs:
operation queue.declare caused a channel exception precondition_failed: inequivalent arg ‘x-dead-letter-exchange’ for queue ‘QueueTestRetry’ in vhost ‘/’: received none but current is the value ‘tdi.retry.exchange’ of type ‘longstr’
The configuration of my queues is as follows:
QueueTest contains the following parameters:
x-queue-type: quorum
x-max-in-memory-length: 50
x-dead-letter-exchange: tdi.wait.exchange
x-dead-letter-routing-key: QueueTest
QueueTestRetry contains the following parameters:
x-queue-type: quorum
x-max-in-memory-length: 50
x-dead-letter-exchange: tdi.retry.exchange
x-dead-letter-routing-key: QueueTest
However, if I do not specify the x-dead-letter-exchange and x-dead-letter-routing-key parameters, the reconnection works without error.
Is the AutomaticRecoveryEnabled parameter limited when using DLX?
I’m using RabbitMQ 3.11.11