activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kpalania <>
Subject Registering Dynamic Listeners
Date Thu, 18 Sep 2008 16:15:49 GMT

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
* 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. 

Any thoughts? Thanks!
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message