How to simulate message redelivery in AUTO_ACKNOWLEDGE JMS Session Scenario?
In the following test I'm trying to simulate the following scenario: A message queue is started. A consumer designed to fail during message processing is started. A message is produced. The consumer starts processing the message. During processing an exception is thrown to simulate message processing failure. The failing consumer is stopped. Another consumer is started with the intent to pick up the redelivered message. But my test fails and the message is not redelivered to the new consumer. I'll appreciate any hints on this. MessageProcessingFailureAndReprocessingTest.java