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: Dynamic Topics
Date Wed, 11 Oct 2006 16:47:48 GMT
On 10/11/06, Andy Czerwonka <aczerwonka@3esi.com> wrote:
> I've got a requirement where the Topic that a publisher needs to publish to
> is based on context from a raw message.  Is there a best practice for this
> or am I required to know all of the available topics?

You can create the topic on the fly, its a very lightweight object to create

http://incubator.apache.org/activemq/how-do-i-create-new-destinations.html

in terms of JMS, create a MessageProducer using null as the
destination, then just pass in the dynamically created Topic object in
the send() method as a parameter


> The goal here is to have Consumers subscribe to dynamically created Topics
> and have the Producer look into the message and find a Topic that
> corresponds to the message.

For consumers you could either create them dynamically or use
wildcards & selectors

-- 

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

Mime
View raw message