[
https://issues.apache.org/jira/browse/AMQCPP-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Prillaman updated AMQCPP-620:
----------------------------------
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.
was:
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 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 not seen immediately the program can be killed and executed again.
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.
> Retroactive consumer not reliable
> ---------------------------------
>
> Key: AMQCPP-620
> URL: https://issues.apache.org/jira/browse/AMQCPP-620
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Example Code
> Affects Versions: 3.9.4
> Environment: Red Hat 6, ActiveMQ 5.15.0
> Reporter: John Prillaman
> Assignee: Timothy Bish
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)