activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: ActiveMQ 5.4.14 durable topic since start up
Date Tue, 18 Apr 2017 03:46:52 GMT
To the best of my knowledge, it's not possible in ActiveMQ to guarantee
that the broker will deliver all messages in a topic including the ones
before the first consumer joins the topic.  Unlike some other message
brokers such as Kafka and Kinesis, ActiveMQ's design is to delete messages
once they have been consumed by all consumers, which means that there's
generally no reason to keep messages when there are no consumers, nor even
to keep messages that have been delivered to all the current consumers.

With that said, it might be possible to do what you want using a
combination of a subscription recovery policy
<http://activemq.apache.org/subscription-recovery-policy.html> and retroactive
consumers <http://activemq.apache.org/retroactive-consumer.html>, but I've
never used either one so you'd have to try them to see whether they
actually created the behavior you're looking for.

If you have a finite, well-known list of durable consumers on the topic, it
might be possible to script the creation of the durable subscriptions (i.e.
connect and then immediately disconnect using the client ID that each
consumer will be using) immediately after broker startup (for example, by
tying into the activemq start/restart script), but that only works if you
know which subscriptions to create.

Tim

On Apr 14, 2017 2:34 PM, "vladimiri" <vladimir.ilmov@gmail.com> wrote:

Hello, just want to ask for advice on durable subscriptions.

Here is the case:
I do have a lot of message producers for a topic and I want the topic to be
persistent and durable. But the problem in that all messages sent to topic
_before_ first durable consumer starts is treated as non-persistent and
non-durable and will get lost after broker restart.

I tried to configure destinations in broker.xml but it seems It's not the
right place.

I want topic to be durable/persistent before any subscriber starts.

Thank you for your help.



--
View this message in context: http://activemq.2283324.n4.nab
ble.com/ActiveMQ-5-4-14-durable-topic-since-start-up-tp4724963.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message