activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Clean deregistration of publishers
Date Wed, 19 Jul 2006 08:13:25 GMT
On 7/19/06, Kuppe <kuppe@360t.com> wrote:
> I currently have many clients registering for client specific market data
> updates from a market data server. The market data server keeps a list of
> currently registered clients vs. symbols and sends the relevant updates to a
> topic registered by the client (there may be more than one client interested
> in the same market data - eg. two users in the same company).

Incidentally the advisory messages in ActiveMQ do a similar thing...
http://activemq.org/site/advisory-message.html

not exactly the same but kinda similar


> I also use the message limit and eviction policy to throttle the messages at
> the topic level to handle slow consumers.
>
> Under normal conditions a client will be shutdown and deregister all market
> data registrations. However if a client is abruptly disconnected at a
> transport level, this clean deregistration does not take place.

Though the broker is aware of the subscriptions that each connection
has so subscriptions are closed down properly and the advisory
messages should be sent out correctly.


> The question is, i would like to know when the server is sending updates to
> a topic that has no subscribers. I could then cleanly deregister the market
> data requests and save valuable resources.
>
> Can you please help me with the most effective way to handle this scenario?

Advisory messages are your friend. So you can subscribe to
notifications of messages sent to topics or queues which have no
consumers. Just subscribe to the advisory topics and you'll be
notified.

http://activemq.org/site/advisory-message.html
-- 

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

Mime
View raw message