activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Registering Dynamic Listeners
Date Thu, 18 Sep 2008 18:52:31 GMT
2008/9/18 kpalania <>:
> What would be a good way to do this? Basically, this is my requirement -
> * Clients send messages to dynamically created JMS destinations via a
> Messaging Gateway.
> * The gateway has to create dynamic JMS listeners (at runtime, that is) so
> that it listens to each of these new destinations that are created
> dynamically.
> * When messages (or responses) arrive at those destinations, the message
> listener should pick them up and do some processing.
> I do not want to have a thread that wakes up every so often, runs through
> the list of all available destinations and dequeues the messages either in
> serial or parallel (multi-threaded). That seems way too error-prone and a
> maintenance headache too (to monitor those threads etc). Ideally, I would
> want the onMessage() API to be called for each of those destinations.
> I just figured a not-so-fool-proof way to identify destinations dynamically
> (using DestinationSource and DestinationListener) and I presume I would need
> to use that somehow to accomplish what I want here.

This sounds like something Camel could do BTW; we could dynamically
add new routes based on new Destinations being created?

Another option is that there's actually a statically created consumer;
but that consumer uses wildcards?



then you send to some queue called Generated.XYZ. The final result is
sent to the value of the 'foo' header?


Open Source Integration

View raw message