Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Later
-
0.8
-
None
Description
In the 0-10 Java client when a QueueBrowser returns an Enumeration, and it is being enumerated over while the connection fails over, the consumer cannot tell that failover is ocurring and sends messages with incorrect subscriber tag numbers to the broker. The BasicMessageConsumer_0_10 uses the shared BasicMessageConsumer#acquireReceiving(boolean) method which tries to call AMQConnection#isFailingOver() and #blockUntilNotFailingOver() and receives incorrect results. This is because AMQConnectionDelegate_0_10 does not start a FailoverHandler continuation and therefore the AMQProtocolHandler#setFailoverLatch(CountdownLatch) and associated methods are never called.
To correct this behaviour update the connection close method of the 0-10 delegate to create the latch, attempt failover and then decrement and remove the latch on success.
QueueBrowserAutoAckTest#testFailoverWithQueueBrowser() is excluded from the cpp.noprefetch profile.