Description
When testing AMQCPP-364/AMQCPP-363, we noticed that on broker shutdown, a listener receives a message twice through onMessage callbacks.
Testcase for a 5.3 broker
1) In the onMessage before acknowledging the message, shutdown the broker.
2) Then acknowledge the message while broker is still off.
3) Bring the broker back up and you see the message delivered again to the onMessage () callback.
With a 5.5 broker, the problem also happens when ack'ing the message when the broker is back alive. When ack'ing the firs message, you see an error messag in the broker log:
WARN | Ignoring ack received before dispatch; result of failover with an outstanding ack. Acked messages will be replayed if present on this broker.
Ignored ack: MessageAck
A java test program (e.g. the ones in the activeMQ examples directory) work fine: no message duplicates there. When the message gets redelivered to a different client, the second ack'ing results in an exception raised to the java client.
Kind regards,
Chris