You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mschmeiser <ms...@sasktel.net> on 2019/07/02 21:12:08 UTC

Retroactive consumer help

I've already posted this question to Stack Overflow here:
https://stackoverflow.com/questions/56858870/retroactive-consumers-in-activemq-jms-api

Essentially I seem unable to get a retroactive consumer working. The
documentation is very lacking in any detail on how to actually set it up. I
create a topic with "topicName?consumer.retroactive=true" but it doesn't
seem to have any effect.

I need late-joiners to be able to receive topics that were published before
the subscription was made. It sounds like retroactive consumers can do that;
however, if no subscriptions are registered before a publisher starts
sending messages it seems that the messages are ignored and the 'unrouted
messages' counter increments immediately.

I've spent about a day looking for workable examples but none of the ones I
found at
https://github.com/apache/activemq/tree/master/activemq-unit-tests/src/test/java/org/apache/activemq/test/retroactive
seemed to set the retroactive consumer the way the documentation did (ie.
with '?consumer.retroactive=true').

Thank you for your time.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Retroactive consumer help

Posted by mschmeiser <ms...@sasktel.net>.
Thank you for the feedback.

I apologize for misreading the documentation. Google doesn't do a great job
of delineating between 5.X and Artemis, and the ActiveMQ homepage says
there's a high-degree of feature parity between the two, so I assumed that
Artemis supported retroactive queues.

I have demonstrated the use case requirements by using a Last Value Queue
with non-destructive consumers.

However, that has raised a new issue I spent the better part of today
investigating. I made a new topic for it here:
http://activemq.2283324.n4.nabble.com/Retroactive-consumer-help-td4751391.html

Thanks again!



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Retroactive consumer help

Posted by Tim Bain <tb...@alumni.duke.edu>.
As was noted in the answers to your StackOverflow question, 5.x does
support retroactive consumption and Artemis does not.

Just to make sure, you would only need a new consumer to have access to the
most recent message, not any before it, right? If you need access to the
full recent history of the destination, you'd need to look at the
journal-based messaging middleware products:
Kafka/Kinesis/RocketMQ/Pulsar/etc.

Tim

On Wed, Jul 3, 2019, 6:19 AM mschmeiser <ms...@sasktel.net> wrote:

> The answer is pointing me in the direction of durable subscriptions.
> However,
> to my knowledge, durable subscriptions only ensure that topics published
> while a subscriber is down are received when it comes back up. Durable
> subscriptions don't ensure that a late-joiner receives the latest copy of a
> topic the first time it subscribes. Does ActiveMQ (Artemis or 5.X) support
> this case?
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: Retroactive consumer help

Posted by mschmeiser <ms...@sasktel.net>.
The answer is pointing me in the direction of durable subscriptions. However,
to my knowledge, durable subscriptions only ensure that topics published
while a subscriber is down are received when it comes back up. Durable
subscriptions don't ensure that a late-joiner receives the latest copy of a
topic the first time it subscribes. Does ActiveMQ (Artemis or 5.X) support
this case?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Retroactive consumer help

Posted by Justin Bertram <jb...@apache.org>.
It looks like your question on Stack Overflow has been answered.


Justin

On Tue, Jul 2, 2019 at 4:12 PM mschmeiser <ms...@sasktel.net> wrote:

> I've already posted this question to Stack Overflow here:
>
> https://stackoverflow.com/questions/56858870/retroactive-consumers-in-activemq-jms-api
>
> Essentially I seem unable to get a retroactive consumer working. The
> documentation is very lacking in any detail on how to actually set it up. I
> create a topic with "topicName?consumer.retroactive=true" but it doesn't
> seem to have any effect.
>
> I need late-joiners to be able to receive topics that were published before
> the subscription was made. It sounds like retroactive consumers can do
> that;
> however, if no subscriptions are registered before a publisher starts
> sending messages it seems that the messages are ignored and the 'unrouted
> messages' counter increments immediately.
>
> I've spent about a day looking for workable examples but none of the ones I
> found at
>
> https://github.com/apache/activemq/tree/master/activemq-unit-tests/src/test/java/org/apache/activemq/test/retroactive
> seemed to set the retroactive consumer the way the documentation did (ie.
> with '?consumer.retroactive=true').
>
> Thank you for your time.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>