You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Allesmallachen <Sp...@web.de> on 2007/03/15 16:34:50 UTC

Subscription acknowledgements

Hi,
I have an application scenario where it is neccessary that subscribers know
when they are successfully subscribed.

1. Is there a mechanism available in ActiveMQ (I couldn't find any) or do I
have to implement some kind of request/reply between subscribers and
publishers (like: "plz send a dummy notification to my topic"->"dummy
notification"->"ok, I'm subscribed")?

Another solution could be implemented with advisory messages.
A subscriber first subscribes to the predefined advisory topic, then to his
topic of interest and then waits until he receives the advisory notification
regarding his topic subscription.
However, the documentation of advisory messages does not define precisely
when an  advisories message is created. 
2. Is the advisory message created when a subscription message is received
by a broker or when a subscription is actually active (i.e. effected the
data-structures on the broker, is part of the notification matching
process)?

This problem is even more sever if you have a network of brokers where it
can take some time until a subscription is active.

I think acknowledgments are needed because otherwise a subscriber cannot
decide whether he receives no notifications because there are none or
because his subscription failed.

I'm interested in your thoughts and suggestions regarding subscription
acknowledgments with JMS.

Christian
-- 
View this message in context: http://www.nabble.com/Subscription-acknowledgements-tf3409028s2354.html#a9497095
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Subscription acknowledgements

Posted by James Strachan <ja...@gmail.com>.
On 3/15/07, Allesmallachen <Sp...@web.de> wrote:
>
> Hi,
> I have an application scenario where it is neccessary that subscribers know
> when they are successfully subscribed.

A subscriber is successfully subscribed when the
session.createConsumer(...) method returns.


> 1. Is there a mechanism available in ActiveMQ (I couldn't find any) or do I
> have to implement some kind of request/reply between subscribers and
> publishers (like: "plz send a dummy notification to my topic"->"dummy
> notification"->"ok, I'm subscribed")?

No; though you can monitor ActiveMQ to see whats going on...
http://activemq.apache.org/how-can-i-monitor-activemq.html


> Another solution could be implemented with advisory messages.
> A subscriber first subscribes to the predefined advisory topic, then to his
> topic of interest and then waits until he receives the advisory notification
> regarding his topic subscription.
> However, the documentation of advisory messages does not define precisely
> when an  advisories message is created.
> 2. Is the advisory message created when a subscription message is received
> by a broker or when a subscription is actually active (i.e. effected the
> data-structures on the broker, is part of the notification matching
> process)?

When a subscription is created, its active.
-- 

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