This is continuation from How to use Mule Expression in JMS:selector but a different question. I am using mulerequester to read off the queue as shown below.
<mulerequester:request config-ref="Mule_Requester" resource="wmq://REPLY.QUEUE?selector=JMSCorrelationID%3D'#[sessionVars.myCorrelationId]'" doc:name="Mule Requester" timeout="120000"/>
It works if I have one wmqConnector but I have 2 wmq connectors in my mule project (wmqconnector and wmqconnector1), pointing to different servers. During runtime, when mulerequester resolve the URL given in the "resource", it encounters 2 connectors matching the wmq protocol and I get the following error message "There are at least 2 connectors matching protocol "wmq", so the connector to use must be specified on the endpoint using the 'connector' property/attribute. Connectors in your configuration that support "wmq" are: wmqConnector1, wmqConnector, (java.lang.IllegalStateException)". I am not sure how to tell mulerequester which wmqConnector to use.
I referred to mule documentation for mulerequester but couldnt find any solution. Any suggestions?
Pass the connector as a uri Param like this:
Here is my modified mulerequester as per Ryan's suggestion. It uses both connector and selector as Uri params.