Error: Failed to create queue 'define-list-price.q' on connection 'default' with 'Error: Operation failed: QueueDeclare; 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'define-list-price.q' in vhost '/': received the value 'dead-letter.ex' of type 'longstr' but current is none"
at node_modules/amqplib/lib/channel.js:127:17
at node_modules/amqplib/lib/channel.js:401:7
at /node_modules/amqplib/lib/connection.js:63:33
at /node_modules/amqplib/lib/connection.js:476:48
My mistake
The define-list-price queue already exists without the current deadLetter configuration. To it works, I needed to delete exchange and the queue to create it again. Sorry
Error: Failed to create queue 'define-list-price.q' on connection 'default' with 'Error: Operation failed: QueueDeclare; 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'define-list-price.q' in vhost '/': received the value 'dead-letter.ex' of type 'longstr' but current is none"
at node_modules/amqplib/lib/channel.js:127:17 at node_modules/amqplib/lib/channel.js:401:7 at /node_modules/amqplib/lib/connection.js:63:33 at /node_modules/amqplib/lib/connection.js:476:48
snippet of my configuration:
exchanges = [ {name: 'dead-letter.ex', type: 'direct', persistent: true, durable: true} ]
queues = [ {name: 'define-list-price.q', durable: true, limit: 1, subscribe: true, deadLetter: 'dead-letter.ex'} ]
bindings = [ {exchange: 'define-list-price.ex', target: 'define-list-price.q', keys: ['define-list-price']} ]
Thanks