activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Dynamic Topics
Date Wed, 11 Oct 2006 16:47:48 GMT
On 10/11/06, Andy Czerwonka <> 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

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



View raw message