[rabbitmq-discuss] Autorecovery Issue

Ranjitha Shet ranjithavshet09 at gmail.com
Fri Jun 20 07:16:13 BST 2014


>
>  Hi,
>


*>> when I disconnect the network cable, say it gets disconnected when both
receiving and publishing takes place.. (Message published and received are
different messages(same exchange))  ----> say the name is exchange1
published from server side*

Connections, channels, exchange, queue, binding all can be viewed  in
Management plugin after reconnecting the network cable. From this can i
assume that reconnection is successful?
But if from server side there is a publish to same exchange (exchange1)
 after reconnecting (say the server publish some message after 5mins of
reconnection) , then i still get this error.

DefaultExceptionHandler: Consumer
com.rabbitmq.client.QueueingConsumer at 5edcf5
(amq.ctag-AcMX2m0FBSPePzrjNqDi7Z) method handleDelivery for channel
AMQChannel(amqp://guest@localhost:5672/,1) threw an exception for channel
AMQChannel(amqp://guest@localhost:5672/,1):
com.rabbitmq.client.ShutdownSignalException: connection error
at
com.rabbitmq.client.QueueingConsumer.checkShutdown(QueueingConsumer.java:172)
at
com.rabbitmq.client.QueueingConsumer.handleDelivery(QueueingConsumer.java:124)
at
com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:140)
at
com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:85)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Software caused connection abort: recv
failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:271)
at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95)
at
com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:139)
at
com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:532)
... 1 more


I am not getting how to solve this..
When checked in Management plugin, after getting this exception, Channel
and Queue is no more available.

to receive message what I do is -->

while(true){

try{

QueueingConsumer.Delivery delivery = consumer.nextDelivery();
..
..
}
catch (ShutdownSignalException sse) {

// notify client about network disconnection
// check if connection and channel is open... if its open then this current
thread is delayed for some time so that exchange, queue, binding and
consumer are restored..

} catch (java.io.IOException ioe) {

}


} // end of while
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140620/febaa8a1/attachment.html>


More information about the rabbitmq-discuss mailing list