问题描述
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"/>
如果我有一个wmqConnector,但在我的Mule项目中有2个wmq连接器(wmqconnector和wmqconnector1),则指向不同的服务器,则可以使用.在运行时,当mulerequester解析资源"中给出的URL时,它遇到2个与wmq协议匹配的连接器,并且我收到以下错误消息至少有2个与协议"wmq"匹配的连接器,因此要使用的连接器必须是在端点上使用连接器"属性/属性指定.配置中支持"wmq"的连接器为:"wmqConnector1,wmqConnector((java.lang.IllegalStateException)").我不确定如何告诉mulerequester使用哪个wmqConnector.
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.
我向m子文档询问了mulerequester,但找不到任何解决方案.有什么建议吗?
I referred to mule documentation for mulerequester but couldnt find any solution. Any suggestions?
推荐答案
将连接器作为uri参数传递,如下所示:
Pass the connector as a uri Param like this:
<mulerequester:request config-ref="Mule_Requester" resource="jms://input?connector=AMQConnector1" doc:name="Request a message from a queue" />
这篇关于当jms或wmq连接器不止一个时使用mulerequester的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!