Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
Description
Have the following code snippet, client is transacted:
public void onMessage(Message message) { try { if (message instanceof TextMessage) { TextMessage textMessage = (TextMessage) message; System.out.println("Message:"+((TextMessage) message).getText().toString().toLowerCase()); //System.exit(1); if (((TextMessage) message).getText().toString().toLowerCase().contains("HELLO".toLowerCase())) { System.out.println("Yes"); message.acknowledge(); System.exit(1); session.close(); session.commit(); }
The client does a system.exit before the message is committed or rolledback.
The message gets rolled back to the destination, but the redelivery count is not incremented - so the message is never bounced to the DLQ in this scenario.
If we explicitly call rollback(), the message is sent to the DLQ after 7 attempts.
Question is just to check if this is expected behavior. I had a look at the JMS spec but didn't see this scenario addressed anywhere.
Attachments
Issue Links
- relates to
-
ENTMQ-984 redeliveryCounter doesn't increase (=0) in Fuse 6.0 with patch R3 applied, when transacted consumer receives messages, but exits before commiting transaction (see ENTMQ-595)
- Closed