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: Failover topic subscribers
Date Thu, 06 Jul 2006 16:50:44 GMT
On 7/6/06, James Strachan <james.strachan@gmail.com> wrote:
[snip]
> Basically we could do something like this...
>
> * we configure one or more wildcards to indicate the 'virtual topics'
> to use.  e.g. something like this in the activemq.xml...
>
> <virtualTopic topic="FOO.>" queuePrefix="VirtualTopic."/>
>
> * when a durable topic message is sent to a virtual topic FOO.BAR  we
> dispatch it to the non-persistent Topic region as before, but instead
> of using the persistent topic region we do the following...

Strike that. Replace the above with...

* when a topic message is sent to a virtual topic FOO.BAR  we dispatch
it as normal (as folks could be using regular topic subscriptions -
durable and non-durable on this topic. But in addition we also then...


> * look for all the queues called VirtualTopic.*.FOO.BAR and send a
> copy of the message to it.

> * then any consumer can subscribe to a queue called
> VirtualTopic.${subscriberName}.FOO.BAR

etc.

So its much simpler afterall :) The interceptor just needs to look for
all the available queues for ${prefix}.*.${topicName}. A simple
implemenation of that would iterate through the
broker.getDestinationMap().

A more optimal solution would be to do something like

Set destinations = getDestinations(new ActiveMQQueue(prefix + ".*." +
topicName);

(I'm just adding an implementation of the getDestinations() method
into the Broker/Region interfaces)

-- 

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

Mime
View raw message