On 7/6/06, James Strachan <[EMAIL PROTECTED]> 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/

Reply via email to