activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SummerScent <scent.o.sum...@gmail.com>
Subject Re: ActiveMQ does not keep durable subscription when re-start
Date Tue, 23 Jun 2015 07:00:42 GMT
Hi Tim and Tim ,

1. Even I set {persistent="true" } in broker or not, the problem is still
happened.

2. I use default setting for broker. Please see the xml file attached.

activemq.xml
<http://activemq.2283324.n4.nabble.com/file/n4698085/activemq.xml>  

3. For the durable topic subscriber:

if I created Durable Topic Subscriber by Web Console, then these Durable
Topic Subscribers will be still remain when I re-start the broker. (The
problem with these Durable Topic Subscriber is that: sometimes they don't
send the pending messages to the actual subscriber when it connected).
 
If I created the Durable Topic Subscriber by MQTT client (MQTT client when
connect to broker without clear session) then these Durable Topic
Subscribers will be erased when broker restarts.

<http://activemq.2283324.n4.nabble.com/file/n4698085/activedurable.png> 
<http://activemq.2283324.n4.nabble.com/file/n4698085/offlinedurable.png> 
<http://activemq.2283324.n4.nabble.com/file/n4698085/durablejmx.png> 

4. Both in Web Console and JMX, there is no more Durable Topic Subscriber.
<http://activemq.2283324.n4.nabble.com/file/n4698085/durable_restartgateway.png> 
<http://activemq.2283324.n4.nabble.com/file/n4698085/durable_jmx_restartgateway.png>


5. At the time restart the broker, MQTT client can connected and create new
Durable Topic Subscribers successfully. 

You can see the pictures I attached here.


Tim Bain wrote
> I agree with Tim: you haven't provided enough details about your
> configuration and your test case when asking for help.  (The same was true
> for your issue that turned out to be the RETAINED flag; knowing how many
> and which messages were being re-delivered might have made it easier to
> zero in on the problem quicker.)
> 
> So please tell us:
> 
>    - How you've configured the broker's persistence store
>    &lt;http://activemq.apache.org/persistence.html&gt;
>    - Whether you've configured any other broker options that you think
>    might be relevant (the easiest way to do this is just publish your
> broker
>    config file)
>    - How you're creating the durable subscribers (last time you were using
>    the web console; from your description I wasn't sure if the MQTT
> subscriber
>    was doing that in code)
>    - How you're determining that the durable subscription has been deleted
>    (have you looked in JMX, or just the web console, or are you
> determining
>    based whether the subscriber gets more messages?)
>    - What the behavior of the subscriber is at the time you restart the
>    broker (have you stopped it or is it still running? does it
> successfully
>    reconnect, or not? does a new subscription get created when it
> reconnects?
>    what else are you seeing that you think would be useful to us?)
> 
> Tim, the other question targeted 5.11.1, so I'd guess the same is true
> here.  But SummerScent, it's always good practice to make threads stand on
> their own without relying on someone having read the prior ones, because
> anyone who gets here by searching Google for a related problem isn't going
> to read the earlier threads.
> 
> Tim
> 
> On Mon, Jun 22, 2015 at 6:33 AM, Timothy Bish &lt;

> tabish121@

> &gt; wrote:
> 
>> The durable subscription functionality is pretty well tested at this
>> point
>> so I'd be more inclined to suspect configuration problems.  You haven't
>> set
>> something like delete all messages on start or something in your ActiveMQ
>> configuration.
>>
>> Its a good idea to provide version information and even better test cases
>> or sample code for questions like this so we can see what is going on.
>>
>> On Mon, Jun 22, 2015 at 3:02 AM, SummerScent &lt;

> scent.o.summer@

> &gt;
>> wrote:
>>
>> > Hi all,
>> >
>> > I have a MQTT subscriber which create some Durable Topic Subscribers
>> when
>> > connected to ActiveMQ.
>> >
>> > But when the ActiveMQ restarts, it clear all the Durable Topic
>> Subscribers.
>> >
>> > Do you have any solution to keep these Durable Topic Subscribers even
>> when
>> > the ActiveMQ restart?
>> >
>> > Thank you!





--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-does-not-keep-durable-subscription-when-re-start-tp4698038p4698085.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message