Message loss during failover
mlange Jun 13, 2013 11:49 AMWe have a clustered setup (3 master/3 backup nodes) with a shared storage. I wonder why messages are lost when a failover is done (shutting down one master node, after failover has occured the master node is restarted again and becomes the live instance).
We are using plain JMS for producing and consuming:
Producer:
session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queueSender.send(....)
Consumer:
QueueSession session = connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
message = queueReceiver.receive(2000L);
During the failiover the client gets several exceptions:
STDERR 'Caused by: HornetQException[errorCode=3 message=Timed out waiting for response when sending packet 49]'
ERROR 2013-06-13 17:23:22,078 [http-0.0.0.0-6003-37][d0a99a0f-0d09-4f9d-99d0-5de4336f409c][] STDERR ' at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:302)'
ERROR 2013-06-13 17:23:22,078 [http-0.0.0.0-6003-37][d0a99a0f-0d09-4f9d-99d0-5de4336f409c][] STDERR ' at org.hornetq.core.client.impl.ClientSessionImpl.bindingQuery(ClientSessionImpl.java:399)'
OR
"Unblocking a blocking call that will never get a response"
According to the docs:
What is the recommended way here? Is it safe to retry in case of HornetQException.UNBLOCKED and/or HornetQException.CONNECTION_TIMEDOUT? Are there any recommendations regarding the consumer? In which exception cases must transactions be rolled back/when is HornetQ rolling back itself?
Thanks!
Marek