我的流程是必须使用组件请求 - 回复两次,但当我尝试执行以下问题时:
<flow name="myprojectFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<request-reply doc:name="RR1">
<jms:outbound-endpoint queue="req_queue" doc:name="JMS" connector-ref="Active_MQ">
<jms:transaction action="ALWAYS_BEGIN"/>
</jms:outbound-endpoint>
<jms:inbound-endpoint queue="rep_queue" doc:name="JMS" connector-ref="Active_MQ">
<jms:transaction action="ALWAYS_BEGIN"/>
</jms:inbound-endpoint>
</request-reply>
<request-reply doc:name="RR2">
<jms:outbound-endpoint queue="req_queue" doc:name="JMS" connector-ref="Active_MQ">
<jms:transaction action="ALWAYS_BEGIN"/>
</jms:outbound-endpoint>
<jms:inbound-endpoint queue="rep_queue" doc:name="JMS" connector-ref="Active_MQ">
<jms:transaction action="ALWAYS_BEGIN"/>
</jms:inbound-endpoint>
</request-reply>
</flow>
另一个系统从req_queue接收消息并发送到rep_queue。
错误:
ERROR 2015-10-07 19:48:41,703 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
org.mule.api.transport.ConnectorException: There is already a listener registered on this connector on endpointUri: jms://rep_queue. Connector that caused exception is: ActiveMQJmsConnector
{
name=Active_MQ
lifecycle=start
this=75361cf6
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[jms]
serviceOverrides=<none>
}
at org.mule.transport.AbstractConnector.registerListener(AbstractConnector.java:1258) ~[mule-core-3.7.0.jar:3.7.0]
at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:104) ~[mule-core-3.7.0.jar:3.7.0]
at org.mule.routing.requestreply.SimpleAsyncRequestReplyRequester.start(SimpleAsyncRequestReplyRequester.java:87) ~[mule-core-3.7.0.jar:3.7.0]
at org.mule.processor.chain.AbstractMessageProcessorChain.start(AbstractMessageProcessorChain.java:102) ~[mule-core-3.7.0.jar:3.7.0]
at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:325) ~[mule-core-3.7.0.jar:3.7.0]
at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:351) ~[mule-core-3.7.0.jar:3.7.0]
at org.mule.construct.Flow.doStart(Flow.java:90) ~[mule-core-3.7.0.jar:3.7.0]
at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:136) ~[mule-core-3.7.0.jar:3.7.0]
如何在一个流程中两次使用相同JMS队列的请求 - 回复?
答案 0 :(得分:0)
您确定JMS队列指向您吗?我可以看到你发送消息到“req_queue”并指向“rep_queue”来接收消息。你永远不会从“rep_queue”那里得到消息。我稍微修改过并且从我这里工作过。如果它不符合您的要求,请告诉我......
Server 1: 10.0.0.1
Server 2: 10.0.0.2