Reputation: 129
We have WSO2 ESB listening on to a single ActiveMQ Queue. However we want to configure multiple proxies on listening on to the JMS queue.. however we want the proxy to only consume message meant for it. Is there a mechanism to set JMS Message selector on the ESB Proxy so that it consumes only message designated for it. ?
Thanks Rajiv Patil
Upvotes: 0
Views: 875
Reputation: 17850
Yes, you can have multiple proxy services listening to the same queue, each following a certain JMS MessageSelector. You will have to set the transport.jms.MessageSelector
parameter for each proxy like this (value 100 is variable, each proxy service containing a different number):
<parameter name="transport.jms.MessageSelector">account='100'</parameter>
And the Java message producer sending the message to the JMS broker is setting the message selector with:
// this will set a key/value pair as JMS message selector
// 100 should be a variable in your case
message.setStringProperty("account", "100");
This was tested on ActiveMQ 4.7 and WSO2 ESB 4+.
Upvotes: 0
Reputation: 612
AFAIK it is not possible to perform such a selection. However there are two possible approaches to achieve the above.
Upvotes: 0