-
Bug
-
Resolution: Done
-
Critical
-
EAP_EWP 5.1.1
-
None
-
Not Required
-
NEW
When server is killed when HornetQ server stored ack to journal but did not finish QueueImpl.postDeliver() method then message is lost.
Test scenario:
1. Start EAP server with HornetQ and queue InQueue
2. Install byteman script [1] - "kill server when x-th message is being acknowledge"
3. Send messages to InQueue
4. Read messages from InQueue with standalone client using CLIENT_ACKNOWLEDGE mode for session (each message is acknowledged)
5. Restart server
6. Read rest of messages
Result:
1 message is not delivered
client gets exception from msg.acknowledge() and ends
Byteman script:
RULE setup counter
CLASS org.hornetq.core.server.impl.QueueImpl
METHOD <init>
AT EXIT
IF TRUE
DO createCounter("counter")
ENDRULE
RULE info about incrementing counter
CLASS org.hornetq.core.server.impl.QueueImpl
METHOD postAcknowledge
AT INVOKE org.hornetq.core.persistence.StorageManager.deleteMessage(long)
IF TRUE
DO incrementCounter("counter");
System.out.println("Called acknowledge message - kill between - ack saved to journal (commited) and deletion of message " + readCounter("counter"))
ENDRULE
RULE kill on receive
CLASS org.hornetq.core.server.impl.QueueImpl
METHOD postAcknowledge
AT INVOKE org.hornetq.core.persistence.StorageManager.deleteMessage(long)
IF readCounter("counter")>123
DO System.out.println("Byteman invoked"); killJVM();
ENDRULE
It seems to be a quality issue for our HornetQ component.
Thank you,
Mirek