Crishel,

Are you using durable subscriptions on your topics?  If not, that's why
it's not behaving the way you expect.  Topic semantics say that messages
for a given non-durable subscriber can be discarded whenever that
subscriber disconnects, and a failover event involves a disconnection of
all subscribers from the original master broker followed by a connection to
the new master broker.  So it's entirely expected that all non-durable
subscriptions will lose all messages when a failover happens.

You can change the behavior you experience by changing your subscribers to
be durable, but this means that if a subscriber disappears without
unsubscribing and never returns, your broker will accumulate messages for
that consumer (which would not have happened with a non-durable
subscription).  You should take steps to protect the broker from this
situation; you might consider some combination of the features listed in
http://activemq.apache.org/manage-durable-subscribers.html and
http://activemq.apache.org/slow-consumer-handling.html, including using
message expiration dates, using some form of pending message limit
strategy, removing inactive subscribers, etc.

Tim

On Thu, Sep 1, 2016 at 11:00 PM, <crishel.yu...@toro.io> wrote:

> Hi, Tim!
>
> I know they've already ask you this many times but I just can't get it. My
> messages are lost on every failover. I'm using topics instead of queues. Is
> there any way I can persist my messages thru activemq or the persisting
> messages by default on my application itself? Thank you very much.
>
> Regards,
> Crishel Yumul
>
> _____________________________________
> Sent from http://activemq.2283324.n4.nabble.com
>
>

Reply via email to