You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Steve Powell <sp...@vmware.com> on 2011/09/28 15:49:29 UTC

Re: STOMP SUBSCRIBE and UNSUBSCRIBE behaviour

Steve Powell wrote:
> 
> I would like some clarification of the precise intended semantics
> of the SUBSCRIBE and UNSUBSCRIBE STOMP commands in ActiveMQ.
> 
> I hope this is the right mailing list.
> 
I'm guessing this isn't the right mailing list. Please confirm.


--
View this message in context: http://activemq.2283324.n4.nabble.com/STOMP-SUBSCRIBE-and-UNSUBSCRIBE-behaviour-tp3809620p3851297.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: STOMP SUBSCRIBE and UNSUBSCRIBE behaviour

Posted by Aleksandar Ivanisevic <al...@ivanisevic.de>.
Steve Powell <sp...@vmware.com> writes:

> On 28 Sep 2011, at 20:40, tabish121@gmail.com [via ActiveMQ] wrote:
>> Can you clarify what it is you want to know, the stomp spec defines this 
>> pretty clearly already, what part do you need help with? 
>
> Durable topic subscriptions are not described in the STOMP spec.
> My questions relate to ActiveMQ/Apollo STOMP behaviour.

I'm not sure AMQ and Apollo are the same. I can tell you what happens
in AMQ, derived from my empirical observations, since, as you noted,
the documentation is not really useful when we are into details.

> Specifically: if a SUBSCRIBE id:id01;destination:/topic/foo;persistent:true;; is issued
> when an EXISTING global id:id01; destination:/topic/bah;persistent:true;; already exists,
> what happens to active subscribers of the id01 subscription?
>
> This is a repeat subscription with a different topic but the same
> id.

subscriptions are identified with client id and subscription id, not
by destination, so those two will be different if issued from
different client ids. Otherwise you will get kicked out with
javax.jms.InvalidClientIDException.

> Also: if an UNSUBSCRIBE id:id01;persistent:true;; is issued what happens to existing
> active subscribers of the durable subscription id01?
>
> This is an UNSUBSCRIBE of a durable topic subscription

I wasn't able to unsubscribe a durable subscriber from AMQ via STOMP
no matter what I did. The only way to kill a subscription was to
delete it in the web interface.

I've reported it here, but was asked to provide a unit test. Since I'm
an admin and not really familiar with all the tools used in the modern
Java development (took me couple of days just to get AMQ built) I'm
guessing it will take me another couple of months to create a test
case ;)

> The STOMP spec is silent on all semantic issues and the ActiveMQ Apollo specification
> seems to imply that the subscription is destroyed when the UNSUBSCRIBE is issued,
> but it doesn't say what is supposed to happen when a distinct topic destination is
> defined for an existing durable topic subscription.

In AMQ destination doesn't matter, see above.



Re: STOMP SUBSCRIBE and UNSUBSCRIBE behaviour

Posted by Steve Powell <sp...@vmware.com>.
On 28 Sep 2011, at 20:40, tabish121@gmail.com [via ActiveMQ] wrote:
> Can you clarify what it is you want to know, the stomp spec defines this 
> pretty clearly already, what part do you need help with? 

Durable topic subscriptions are not described in the STOMP spec.
My questions relate to ActiveMQ/Apollo STOMP behaviour.

Specifically: if a SUBSCRIBE id:id01;destination:/topic/foo;persistent:true;; is issued
when an EXISTING global id:id01; destination:/topic/bah;persistent:true;; already exists,
what happens to active subscribers of the id01 subscription?

This is a repeat subscription with a different topic but the same id.

Also: if an UNSUBSCRIBE id:id01;persistent:true;; is issued what happens to existing
active subscribers of the durable subscription id01?

This is an UNSUBSCRIBE of a durable topic subscription

The STOMP spec is silent on all semantic issues and the ActiveMQ Apollo specification
seems to imply that the subscription is destroyed when the UNSUBSCRIBE is issued,
but it doesn't say what is supposed to happen when a distinct topic destination is
defined for an existing durable topic subscription.

Regards,
Steve Powell
[M: +44-7815-838-558; H:+44-1962-775-598]
Links: SpringSource (a division of VMware), Virgo, RabbitMQ.

--
View this message in context: http://activemq.2283324.n4.nabble.com/STOMP-SUBSCRIBE-and-UNSUBSCRIBE-behaviour-tp3809620p3859312.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: STOMP SUBSCRIBE and UNSUBSCRIBE behaviour

Posted by Timothy Bish <ta...@gmail.com>.
On Wed, 2011-09-28 at 06:49 -0700, Steve Powell wrote:
> Steve Powell wrote:
> > 
> > I would like some clarification of the precise intended semantics
> > of the SUBSCRIBE and UNSUBSCRIBE STOMP commands in ActiveMQ.
> > 
> > I hope this is the right mailing list.
> > 
> I'm guessing this isn't the right mailing list. Please confirm.
> 

Can you clarify what it is you want to know, the stomp spec defines this
pretty clearly already, what part do you need help with?

Regards

-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/