RabbitMQ throw binding error when queue exist

Viewed 531

RabbitMQ throw a binding error whenever we restart it if a queue exists and autodelete is false ErrorLog:

> 2021-10-25T17:59:58.438-0600 ERROR [rabbitmqWorkerImportantListenerContainer-7329] RMQSession - RabbitMQ exception on queue declare name(Tasks), durable(true), exclusive(false), auto-delete(false), properties(null)
java.io.IOException: null
    at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
    at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
    at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
    at com.rabbitmq.client.impl.ChannelN.queueBind(ChannelN.java:1077)
    at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.queueBind(AutorecoveringChannel.java:393)
    at com.rabbitmq.jms.client.RMQSession.declareRMQQueue(RMQSession.java:940)
    at com.rabbitmq.jms.client.RMQSession.createQueue(RMQSession.java:863)
    at jdk.internal.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no binding Tasks between exchange 'jms.durable.queues' in vhost '/' and queue 'Tasks' in vhost '/', class-id=50, method-id=20)
    at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
    at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
    at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
    at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
    at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
    ... 18 common frames omitted
2 Answers

Probably your previously created queue has different settings for auto_ack, exclusive or durable etc.

  • One way is to delete already existing queue on RabbitMQ web-ui (http://localhost:15672/)

  • Or you might restart RabbitMQ server, create & bind queues from the scratch.

  • Or you might change the settings of the existing queue if possible.

Related