Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.9.4
-
None
-
None
-
Red Hat 6, ActiveMQ 5.15.0
Description
Adding the retroactive parameter to the broker URI does not produce reliable results. This can be reproduced by modifying the example code (http://activemq.apache.org/cms/example.html), changing the brokerURI value to "failover:(tcp://localhost:61616?consumer.retroactive=true)";
If the destination topic has been created and populated on the activeMQ broker the expected result is to see the data printed from the onMessage callback immediately. This happens most of the time but if the example program is run multiple times the expected result will not be observed. Modifying the waitMillis by reducing the wait time will allow for a quicker reproducing of the issue, however if the data is seen immediately the program can be killed and executed again. It may take up to 25-30 times or more before seeing the failure or it may take 3 times.
The dispatch count is observed to be incremented in the JMX console when the data is not printed. The data will be printed if the topic is populated through another client connection publishing data even if the 'retroactive' data was not received.
I believe this issue is in the ActiveMQ-CPP library as other clients reliably receive this data through other connections. if the CPP client is changed to use the synchronous blocking receive method as opposed to the asynchronous callbacks in the consumer the data is received as expected.