com.rabbitmq.client.ShutdownSignalException: connection error; reason: {#method<connection.close>(reply-code=320, reply-text=CONNECTION_FORCED - broker forced connection closure with reason 'shutdown', class-id=0, method-id=0), null, "[B@275e538e"}
at com.rabbitmq.client.QueueingConsumer.handle(QueueingConsumer.java:198)
at com.rabbitmq.client.QueueingConsumer.nextDelivery(QueueingConsumer.java:214)
How do I gracefully handle the shutdown so that I can get back to consuming? I attempted shutting the channel / connection and creating a new connection from the factory but the shutdown signal exception is still thrown after 'reconnect'. What's going on under the hood that keeps me from successfully consuming again? Is there some sort of message I need to tell RabbitMQ "yes I know I shut you down, but its you're back up so stop crying..."
Thanks,
Matt
this.consumer.nextDelivery();
} catch (ShutdownSignalException e) {
log.error("ShutdownSignalException", e);
if (this.channel.isOpen()) {
try {
this.channel.close();
} catch (AlreadyClosedException e1) {}
}
if (this.connection.isOpen()) {
try {
this.connection.close();
} catch (AlreadyClosedException e1) {}
}
this.connection = factory.newConnection();
this.channel.basicRecover();
I've got some logic in there to back off during connection refused, but its when the server comes back online that I can't get rid of the ShutDownSignalExceptions.
this.channel = this.connection.createChannel();
Unfortunately there's a bug in the 2.7.1 Java client that obscures the
real error message here. The server logs should tell you more about what
the server is objecting to.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
The bug I was referring to was just hiding the error message in the Java
client (and will be fixed in 2.8.0). You need to look in the server logs
to see what the server is objecting to.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware