Description of problem: When client receives a large message and calls clearBody() on it during failover then RuntimeException is thrown. It seems that according to JMS API [1] there should be JMSException. [1] http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#clearBody%28%29 Stack trace from receiver: 16:49:31,108 Thread-25 ERROR [org.jboss.qa.hornetq.apps.clients.ReceiverTransAck:161] Exception was thrown during receiving messages: java.lang.RuntimeException: HQ119060: Large Message Transmission interrupted on consumer shutdown. at org.hornetq.core.client.impl.ClientLargeMessageImpl.getBodyBuffer(ClientLargeMessageImpl.java:103) at org.hornetq.jms.client.HornetQBytesMessage.getBuffer(HornetQBytesMessage.java:448) at org.hornetq.jms.client.HornetQBytesMessage.clearBody(HornetQBytesMessage.java:416) at org.jboss.qa.hornetq.apps.clients.Client.cleanMessage(Client.java:82) at org.jboss.qa.hornetq.apps.clients.ReceiverTransAck.receiveMessage(ReceiverTransAck.java:343) at org.jboss.qa.hornetq.apps.clients.ReceiverTransAck.run(ReceiverTransAck.java:130) Caused by: HornetQException[errorType=LARGE_MESSAGE_INTERRUPTED message=HQ119060: Large Message Transmission interrupted on consumer shutdown.] at org.hornetq.core.client.impl.LargeMessageControllerImpl.cancel(LargeMessageControllerImpl.java:236) at org.hornetq.core.client.impl.ClientConsumerImpl.resetLargeMessageController(ClientConsumerImpl.java:801) at org.hornetq.core.client.impl.ClientConsumerImpl.clearAtFailover(ClientConsumerImpl.java:528) at org.hornetq.core.client.impl.ClientSessionImpl.handleFailover(ClientSessionImpl.java:1167) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.reconnectSessions(ClientSessionFactoryImpl.java:1041) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.failoverOrReconnect(ClientSessionFactoryImpl.java:710) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:580) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.access$100(ClientSessionFactoryImpl.java:85) at org.hornetq.core.client.impl.ClientSessionFactoryImpl$1.run(ClientSessionFactoryImpl.java:426) at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:106) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626) at java.lang.Thread.run(Thread.java:780)
I can this problem again in EAP 6.3.0.ER2 (HQ 2.3.18). Link to failed test: https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-HornetQ/job/eap-60-hornetq-ha-failover-dedicated-replicated-journal/lastCompletedBuild/testReport/org.jboss.qa.hornetq.test.failover/ReplicatedDedicatedFailoverTestCase/replicatedTestFailoverTransAckQueueMessageReceivedNotAcked/
This is fixed on the 2.3.x branch of HornetQ via commit f519f1e25207121fe81e351ac1c3797fef62087e.
Appears to be fixed by HQ upgrade to 2.3.21 https://bugzilla.redhat.com/show_bug.cgi?id=1132168. Setting to MODIFIED.
Verified in EAP 6.4.0.DR1.1