activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbuberl <sbub...@gmail.com>
Subject Re: Posting to a virtual topic's physical queue
Date Wed, 23 May 2007 18:37:54 GMT



James.Strachan wrote:
> 
> On 5/23/07, sbuberl <sbuberl@gmail.com> wrote:
> 
> There's a cooler solution. You can send individual initial messages to
> consumers via topics using the subscription recovery policy and a
> custom initial message query...
> http://activemq.apache.org/subscription-recovery-policy.html
> 
> basically as a topic subscription starts you have the option to send
> one or more intiial messages. You just use this
> 
> http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.html
> 
> and then provide your own implementation of
> 
> http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/broker/region/policy/MessageQuery.html
> 
> which can just create the initial refresh message(s).
> 
> i.e. you could support some kinda 'last image caching' type thing
> where the consumer receives the last stable state first before any
> future updates.
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

Thanks.  I knew about the subscription policies existed but didn't know I
could override MessageQuery to do as I wish.  How do I configure the
broker's queryBasedSubscriptionRecoveryPolicy to use my custom
implementation of MessageQuery rather than message selectors? 
-- 
View this message in context: http://www.nabble.com/Posting-to-a-virtual-topic%27s-physical-queue-tf3805152s2354.html#a10770177
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message