Hi all! I have one exchange and two queue, when I run my project and exchange (and queue) already declare, i am get exception:
How avoid this exception ? if I need in often redeploy me project.Code:... Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - cannot redeclare exchange 'defaultExchange' in vhost '/' with different type, durable, internal or autodelete value, class-id=40, method-id=10), null, ""}...
my code:
Sorry for my bad EnglishCode:rabbitAdmin.declareExchange(exchange); rabbitAdmin.declareQueue(queue1); rabbitAdmin.declareQueue(queue2);![]()


Reply With Quote