-
1. Re: one jms-bus. multiple jms-listeners?
tfennelly Jun 19, 2009 8:58 AM (in response to kennethbowen)You can do it using a selector on the jms bus config e.g.
<jms-bus busid="LostMessageServiceGW"> <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_exceptions_faults_GW" selector="serviceName='LostMessageService'" /> </jms-bus>
A number of the quickstarts demonstrate this. -
2. Re: one jms-bus. multiple jms-listeners?
ryanhos Jun 23, 2009 1:23 PM (in response to kennethbowen)This is not recommended if you are using JBoss MQ as your messaging provider.
Ryan -
3. Re: one jms-bus. multiple jms-listeners?
ryanhos Jun 23, 2009 1:36 PM (in response to kennethbowen)Oops.
It looks like tfennelly and I both misread your question.
1.) Tom's comment describes the manner of using one queue to back several services by using a message selector. However, each message will only be processed by one service.
2.) My comment regarding the use of message selectors with long queues in MQ is valid, but not applicable to your question.
3.) If you want multiple services to each receive the same message, you have multiple options (in no particular order):
3.1) Never tried it, but set up a topic, rather than a queue, and configure service listeners to subscribe to the topic. This ought to work.
3.2) Set up one service that uses StaticRouter to multi-route to the three other services.
3.3) Forward from service to service to service (using StaticRouter) as you already identified.
3.4) Code up a Routing Slip Router [PoEAA] and donate it? I could sure use one. :) -
4. Re: one jms-bus. multiple jms-listeners?
kennethbowen Jun 23, 2009 1:53 PM (in response to kennethbowen)Thank you, ryanhos. I've set up a simple service, only responsible for routing. I'll look into a proper Routing Slip implementation.
-
5. Re: one jms-bus. multiple jms-listeners?
ryanhos Jun 23, 2009 3:50 PM (in response to kennethbowen)D'oh.
Documentation for the Routing Slip Router is in Enterprise Integration Paterns, not Patterns of Enterprise Application Architecture....wrong big black Addison Wesley book.
Both are worth the read, BTW.