You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Marco.Crivellaro" <ma...@gmail.com> on 2013/02/18 09:21:45 UTC

non durable subscriber on failover reconnect

Hi All,
would a non durable consumer receive the messages that have been published
to a topic while it was disconnected due a failure?

The scenario I am talking about is following:

a) consumer 'S' subscribes to topic
b) messages M1, M2 are published to the topic
c) some sort of failure happens and subscriber 'S' loses connection to the
broker
e) messages M3, M4 are published to the topic
f) consumer 'S' reconnect to the broker (using failover)

M1 and M2 will be consumed because 'S' is connected when they are sent.

what would happen to M3 and M4? will they be dispached to the subscriber
once it reconnect after the failure? Does subscriber 'S' have to be a
durable subscriber in order to receive those messages?



--
View this message in context: http://activemq.2283324.n4.nabble.com/non-durable-subscriber-on-failover-reconnect-tp4663605.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re:Re: non durable subscriber on failover reconnect

Posted by SuoNayi <su...@163.com>.
M3 and m4 will be lost except the subscriber is durable or you employ 
the retroactive consumer feature to let the broker keep past messages.
The retroactive consumer feature seems like a message buffer in broker 
that buffers messages published by producers. When the buffer is full 
some old messages are discarded so your subscriber may not receive 
all messages as well.Currently all subscriber recovery/retroactive policy 
implements keep messages in memory so messages does not survive 
for broker crashes.



At 2013-02-18 16:45:53,"Raul Kripalani" <ra...@evosent.com> wrote:
>Yes, if you want to be JMS spec compliant and you want 100% guarantee that
>all missed messages will be received upon reconnection.
>
>However, AMQ has a nifty feature called Retroactive Consumers which can
>help if you want to avoid durable subscriptions [1], but still keep a
>limited number of past messages around.
>
>One detail: messages don't survive broker crashes with retroactive
>consumers AFAIR, but maybe someone else could confirm.
>
>[1] http://activemq.apache.org/retroactive-consumer.html
>
>Regards,
>Raúl.
>
>Sent while on the move.
>On 18 Feb 2013 08:38, "Marco.Crivellaro" <ma...@gmail.com> wrote:
>
>> Hi All,
>> would a non durable consumer receive the messages that have been published
>> to a topic while it was disconnected due a failure?
>>
>> The scenario I am talking about is following:
>>
>> a) consumer 'S' subscribes to topic
>> b) messages M1, M2 are published to the topic
>> c) some sort of failure happens and subscriber 'S' loses connection to the
>> broker
>> e) messages M3, M4 are published to the topic
>> f) consumer 'S' reconnect to the broker (using failover)
>>
>> M1 and M2 will be consumed because 'S' is connected when they are sent.
>>
>> what would happen to M3 and M4? will they be dispached to the subscriber
>> once it reconnect after the failure? Does subscriber 'S' have to be a
>> durable subscriber in order to receive those messages?
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/non-durable-subscriber-on-failover-reconnect-tp4663605.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>

Re: non durable subscriber on failover reconnect

Posted by Raul Kripalani <ra...@evosent.com>.
Yes, if you want to be JMS spec compliant and you want 100% guarantee that
all missed messages will be received upon reconnection.

However, AMQ has a nifty feature called Retroactive Consumers which can
help if you want to avoid durable subscriptions [1], but still keep a
limited number of past messages around.

One detail: messages don't survive broker crashes with retroactive
consumers AFAIR, but maybe someone else could confirm.

[1] http://activemq.apache.org/retroactive-consumer.html

Regards,
Raúl.

Sent while on the move.
On 18 Feb 2013 08:38, "Marco.Crivellaro" <ma...@gmail.com> wrote:

> Hi All,
> would a non durable consumer receive the messages that have been published
> to a topic while it was disconnected due a failure?
>
> The scenario I am talking about is following:
>
> a) consumer 'S' subscribes to topic
> b) messages M1, M2 are published to the topic
> c) some sort of failure happens and subscriber 'S' loses connection to the
> broker
> e) messages M3, M4 are published to the topic
> f) consumer 'S' reconnect to the broker (using failover)
>
> M1 and M2 will be consumed because 'S' is connected when they are sent.
>
> what would happen to M3 and M4? will they be dispached to the subscriber
> once it reconnect after the failure? Does subscriber 'S' have to be a
> durable subscriber in order to receive those messages?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/non-durable-subscriber-on-failover-reconnect-tp4663605.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>