RabbitMq consumer error in spring-boot

1,452 views
Skip to first unread message

Namita Jaokar

unread,
Sep 20, 2022, 4:29:08 AM9/20/22
to rabbitmq-users
Hi ,

I am trying to implement rabbitmq producer-consumer using spring-boot in windows 10. 
My producer is able to send messages without any error in the application logs.
However, when I start my consumer application , I have observed below error logs before the consumer successfully consumes the message.

Below are the sample application logs:

2022-09-20 13:47:23.550 ERROR 2916 --- [ 127.0.0.1:5672] o.s.a.r.c.CachingConnectionFactory       : Shutdown Signal: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'rabbitmq.demo.queue' in vhost '/': received 'false' but current is 'true', class-id=50, method-id=10)
2022-09-20 13:47:28.554  INFO 2916 --- [           main] o.s.amqp.rabbit.core.RabbitAdmin         : Auto-declaring a non-durable, auto-delete, or exclusive Queue (rabbitmq.demo.queue) durable:false, auto-delete:false, exclusive:false. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2022-09-20 13:47:28.559 ERROR 2916 --- [ 127.0.0.1:5672] o.s.a.r.c.CachingConnectionFactory       : Shutdown Signal: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'rabbitmq.demo.queue' in vhost '/': received 'false' but current is 'true', class-id=50, method-id=10)
2022-09-20 13:47:28.565  INFO 2916 --- [           main] o.s.a.r.l.SimpleMessageListenerContainer : Broker not available; cannot force queue declarations during start: java.io.IOException
Consuming Message - {"@id":1,"empName":"Jack","empId":"1002"}
2022-09-20 13:47:28.647  INFO 2916 --- [           main] c.e.m.c.R.RabbitMqConsumerApplication    : Started RabbitMqConsumerApplication in 16.709 seconds (JVM running for 17.49)


Can someone please help me understand what needs to be fixed in this case or do I need to ignore this kind of messages.
Please advise.

Thanks & Regards,
Namita

Brian Richardson

unread,
Sep 20, 2022, 5:16:39 AM9/20/22
to rabbitm...@googlegroups.com

Hello Namita,

 

The error you are seeing is coming from your queue declarations. In at least one case, you have declared the queue rabbitmq.demo.queue with durable:false, but someone else has declared it first with durable:true. Ensure that all your queue declarations are consistent to avoid this error by changing all durable values to be the same.

 

Regards,

Brian

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/b28d43aa-917a-477e-80eb-20775604b77bn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages