You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "tim.geldart" <ti...@inovis.com> on 2007/01/19 23:07:20 UTC

Stomp durable topic do not UNSUB


I have observed inexplicable behavior (to me, at least) when using the Stomp
C API to consume messages from a durable subscription. I could not find
prior discussion or bugs filed on this topic, so I would like to know if
this is expected behavior.

I am using the 4.2 snapshot, built from the trunk on 1/19. The broker is
running on Windows with JRE 1.5.0_10. The clients are using the Stomp C API
from a remote Solaris box.

Sending a Stomp UNSUB command after successfully creating and receiving
messages on a durable topic appears to have no effect. The JMX console still
shows the durable subscription under the tree path:
org.apache.activemq/Subscription/Durable. If I manually execute the
destroy() method from the console, the console shows the subscription moved
to org.apache/activemq/Subscription/false.

I am passing the topic destination in the UNSUB header. The broker appears
to receive the UNSUB command (I specify a receipt in the UNSUB request and
subsequently receive the corresponding RECEIPT response from the broker) but
does not appear to handle it properly.

Am I missing some trick to unsubscribing durable topics?

Thanks for any response.
-- 
View this message in context: http://www.nabble.com/Stomp-durable-topic-do-not-UNSUB-tf3042823.html#a8458129
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Stomp durable topic do not UNSUB

Posted by Danielius Jurna <da...@elitnet.lt>.
I've submited a bug and a patch for this bug long time ago, but no responce
from AMQ devs. Unsubscribe actually doesn't work neither on topics nor on
queues due to this bug:
http://issues.apache.org/activemq/browse/AMQ-1077


James.Strachan wrote:
> 
> 
> So durable topics are a bit different to other kinds of subscriptions.
> When you unsubscribe, it generally just means that you are not
> currently able to process messages any more (e.g. when you are
> shutting down or something). So unsubscribing does not delete the
> subscription (since the whole point of durable topics is to keep a
> copy of every message matching the subscription, while the client is
> not running).
> 
> So to stop collecting messages for durable subscriptions, you need to
> delete the subscription via the MBeans - i.e. its an adminstrative
> issue (rather than via stomp/jms).
> 
> If you want to start/stop subscriptions within a client, then don't
> use durable topics, use non-persistent subscriptions
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 

-- 
View this message in context: http://www.nabble.com/Stomp-durable-topic-do-not-UNSUB-tf3042823.html#a8522510
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Stomp durable topic do not UNSUB

Posted by Rob Davies <ra...@gmail.com>.
you don't that's a duplicate of AMQ-1077 ?

On 23 Jan 2007, at 22:04, Peter Leonard wrote:

> As an aside, this sounds a lot like the bug Sandeep Chayapathi was  
> just reporting in the email "Destroying durable subscription, does  
> not entirely destory the durable subsciber"
>
> https://issues.apache.org/activemq/browse/AMQ-1135
>
>
> 	Peter
>
>
> Rob Davies wrote:
>> Hi Tim,
>> please file tickets for these
>> cheers,
>> Rob
>> On 23 Jan 2007, at 21:30, tim.geldart wrote:
>>>
>>> Would you like me to file tickets to track either of the  
>>> cirumstances below
>>> or are they already known issues that do not require tickets?
>>>
>>>
>>> rajdavies wrote:
>>>>
>>>>> Would one be mistaken to expect stomp client behavior to be
>>>>> consistent with
>>>>> openwire client behavior?
>>>>
>>>> The behaviour of the STOMP and open wire should be the same
>>>>
>>>
>>> The patch for AMQ-1077 did not appear to address original STOMP  
>>> UNSUB issue.
>>> I cannot find another related 4.2 ticket. Shall I submit a new  
>>> ticket?
>>>
>>>
>>>
>>> rajdavies wrote:
>>>>
>>>>> Should one expect the manual deletion of a durable subscription to
>>>>> yield the
>>>>> same behavior as if the subscription never existed?
>>>>
>>>> Yes - one should
>>>>
>>>
>>> AMQ-1135 addresses this behavior, but is listed as an open issue  
>>> under
>>> version 4.1. Does the ticket need to be placed in a 4.2 queue in  
>>> order to be
>>> worked?
>>>
>>> Regards,
>>> TimG
>>> --View this message in context: http://www.nabble.com/Stomp- 
>>> durable-topic-do-not-UNSUB-tf3042823.html#a8549914
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>


Re: Stomp durable topic do not UNSUB

Posted by Peter Leonard <pe...@peteleonard.com>.
As an aside, this sounds a lot like the bug Sandeep Chayapathi was just 
reporting in the email "Destroying durable subscription, does not 
entirely destory the durable subsciber"

https://issues.apache.org/activemq/browse/AMQ-1135


	Peter


Rob Davies wrote:
> Hi Tim,
> please file tickets for these
> 
> cheers,
> 
> Rob
> On 23 Jan 2007, at 21:30, tim.geldart wrote:
> 
>>
>> Would you like me to file tickets to track either of the cirumstances 
>> below
>> or are they already known issues that do not require tickets?
>>
>>
>> rajdavies wrote:
>>>
>>>> Would one be mistaken to expect stomp client behavior to be
>>>> consistent with
>>>> openwire client behavior?
>>>
>>> The behaviour of the STOMP and open wire should be the same
>>>
>>
>> The patch for AMQ-1077 did not appear to address original STOMP UNSUB 
>> issue.
>> I cannot find another related 4.2 ticket. Shall I submit a new ticket?
>>
>>
>>
>> rajdavies wrote:
>>>
>>>> Should one expect the manual deletion of a durable subscription to
>>>> yield the
>>>> same behavior as if the subscription never existed?
>>>
>>> Yes - one should
>>>
>>
>> AMQ-1135 addresses this behavior, but is listed as an open issue under
>> version 4.1. Does the ticket need to be placed in a 4.2 queue in order 
>> to be
>> worked?
>>
>> Regards,
>> TimG
>> --View this message in context: 
>> http://www.nabble.com/Stomp-durable-topic-do-not-UNSUB-tf3042823.html#a8549914 
>>
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>

Re: Stomp durable topic do not UNSUB

Posted by Rob Davies <ra...@gmail.com>.
Hi Tim,
please file tickets for these

cheers,

Rob
On 23 Jan 2007, at 21:30, tim.geldart wrote:

>
> Would you like me to file tickets to track either of the  
> cirumstances below
> or are they already known issues that do not require tickets?
>
>
> rajdavies wrote:
>>
>>> Would one be mistaken to expect stomp client behavior to be
>>> consistent with
>>> openwire client behavior?
>>
>> The behaviour of the STOMP and open wire should be the same
>>
>
> The patch for AMQ-1077 did not appear to address original STOMP  
> UNSUB issue.
> I cannot find another related 4.2 ticket. Shall I submit a new ticket?
>
>
>
> rajdavies wrote:
>>
>>> Should one expect the manual deletion of a durable subscription to
>>> yield the
>>> same behavior as if the subscription never existed?
>>
>> Yes - one should
>>
>
> AMQ-1135 addresses this behavior, but is listed as an open issue under
> version 4.1. Does the ticket need to be placed in a 4.2 queue in  
> order to be
> worked?
>
> Regards,
> TimG
> -- 
> View this message in context: http://www.nabble.com/Stomp-durable- 
> topic-do-not-UNSUB-tf3042823.html#a8549914
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Stomp durable topic do not UNSUB

Posted by "tim.geldart" <ti...@inovis.com>.
Would you like me to file tickets to track either of the cirumstances below
or are they already known issues that do not require tickets?


rajdavies wrote:
> 
>> Would one be mistaken to expect stomp client behavior to be  
>> consistent with
>> openwire client behavior?
> 
> The behaviour of the STOMP and open wire should be the same
> 

The patch for AMQ-1077 did not appear to address original STOMP UNSUB issue.
I cannot find another related 4.2 ticket. Shall I submit a new ticket?



rajdavies wrote:
> 
>> Should one expect the manual deletion of a durable subscription to  
>> yield the
>> same behavior as if the subscription never existed?
> 
> Yes - one should
> 

AMQ-1135 addresses this behavior, but is listed as an open issue under
version 4.1. Does the ticket need to be placed in a 4.2 queue in order to be
worked?

Regards,
TimG
-- 
View this message in context: http://www.nabble.com/Stomp-durable-topic-do-not-UNSUB-tf3042823.html#a8549914
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Stomp durable topic do not UNSUB

Posted by Rob Davies <ra...@gmail.com>.
On 23 Jan 2007, at 18:12, tim.geldart wrote:

>
> I appreciate the feedback. However, the following comments raise  
> additional
> questions:
>
>
> James.Strachan wrote:
>>
>> So to stop collecting messages for durable subscriptions, you need to
>> delete the subscription via the MBeans - i.e. its an adminstrative
>> issue (rather than via stomp/jms).
>>
>> If you want to start/stop subscriptions within a client, then don't
>> use durable topics, use non-persistent subscriptions

>
> 1. When I use the distribution's example to create a durable  
> subscription,
> then modify ConsumerTool.java to call session.unsubscribe()  
> immediately
> prior to session.close(), the JMX console shows the subscription as  
> deleted
> after executing "ant consumer". This appears to be identical  
> behavior to
> deleting the subscription via MBeans (and is not what a stomp UNSUB  
> does..
> even after applying AMQ-1077).
>
> Would one be mistaken to expect stomp client behavior to be  
> consistent with
> openwire client behavior?

The behaviour of the STOMP and open wire should be the same
>
> 2. After manually deleting a durable subscription, the broker  
> appears to
> continue "remembering" published messages, even if there are no active
> subscriptions to receive the messages. If no other subscriptions are
> subsequently created, then continued publishing of messages to the
> unsubscribed topic will eventually use 100% of the memoryManager's
> configured memory (in my case, 200 MB), after which point, the only  
> way to
> recover is to bounce the broker.
>
> Should one expect the manual deletion of a durable subscription to  
> yield the
> same behavior as if the subscription never existed?

Yes - one should
> Otherwise, the only
> adminstrative option to ridding the system of an unwanted subscription
> appears to involve bouncing the broker.
>
> -Tim
>
>
> -- 
> View this message in context: http://www.nabble.com/Stomp-durable- 
> topic-do-not-UNSUB-tf3042823.html#a8527141
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

cheers,

Rob Davies


Re: Stomp durable topic do not UNSUB

Posted by "tim.geldart" <ti...@inovis.com>.
I appreciate the feedback. However, the following comments raise additional
questions:


James.Strachan wrote:
> 
> So to stop collecting messages for durable subscriptions, you need to
> delete the subscription via the MBeans - i.e. its an adminstrative
> issue (rather than via stomp/jms).
> 
> If you want to start/stop subscriptions within a client, then don't
> use durable topics, use non-persistent subscriptions
> 

1. When I use the distribution's example to create a durable subscription,
then modify ConsumerTool.java to call session.unsubscribe() immediately
prior to session.close(), the JMX console shows the subscription as deleted
after executing "ant consumer". This appears to be identical behavior to
deleting the subscription via MBeans (and is not what a stomp UNSUB does..
even after applying AMQ-1077).

Would one be mistaken to expect stomp client behavior to be consistent with
openwire client behavior?

2. After manually deleting a durable subscription, the broker appears to
continue "remembering" published messages, even if there are no active
subscriptions to receive the messages. If no other subscriptions are
subsequently created, then continued publishing of messages to the
unsubscribed topic will eventually use 100% of the memoryManager's
configured memory (in my case, 200 MB), after which point, the only way to
recover is to bounce the broker.

Should one expect the manual deletion of a durable subscription to yield the
same behavior as if the subscription never existed? Otherwise, the only
adminstrative option to ridding the system of an unwanted subscription
appears to involve bouncing the broker.

-Tim


-- 
View this message in context: http://www.nabble.com/Stomp-durable-topic-do-not-UNSUB-tf3042823.html#a8527141
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Stomp durable topic do not UNSUB

Posted by James Strachan <ja...@gmail.com>.
On 1/19/07, tim.geldart <ti...@inovis.com> wrote:
>
>
> I have observed inexplicable behavior (to me, at least) when using the Stomp
> C API to consume messages from a durable subscription. I could not find
> prior discussion or bugs filed on this topic, so I would like to know if
> this is expected behavior.
>
> I am using the 4.2 snapshot, built from the trunk on 1/19. The broker is
> running on Windows with JRE 1.5.0_10. The clients are using the Stomp C API
> from a remote Solaris box.
>
> Sending a Stomp UNSUB command after successfully creating and receiving
> messages on a durable topic appears to have no effect. The JMX console still
> shows the durable subscription under the tree path:
> org.apache.activemq/Subscription/Durable. If I manually execute the
> destroy() method from the console, the console shows the subscription moved
> to org.apache/activemq/Subscription/false.
>
> I am passing the topic destination in the UNSUB header. The broker appears
> to receive the UNSUB command (I specify a receipt in the UNSUB request and
> subsequently receive the corresponding RECEIPT response from the broker) but
> does not appear to handle it properly.
>
> Am I missing some trick to unsubscribing durable topics?

So durable topics are a bit different to other kinds of subscriptions.
When you unsubscribe, it generally just means that you are not
currently able to process messages any more (e.g. when you are
shutting down or something). So unsubscribing does not delete the
subscription (since the whole point of durable topics is to keep a
copy of every message matching the subscription, while the client is
not running).

So to stop collecting messages for durable subscriptions, you need to
delete the subscription via the MBeans - i.e. its an adminstrative
issue (rather than via stomp/jms).

If you want to start/stop subscriptions within a client, then don't
use durable topics, use non-persistent subscriptions

-- 

James
-------
http://radio.weblogs.com/0112098/