是否可以使用camel路由在活动mq中发送wsdl请求正文。如果是,我可以在下面实现此目的是我的示例代码,其中我试图将wsdl请求主体发送到队列中,但它没有发生。
<route id="report">
<from id="_from2" uri="direct:reportIncident"/>
<to id="_to3" uri="activemq:queue:in.incident.report"/>
<process id="_process1" ref="reportIncidentProcessor"/>
<to id="_to1" uri="log:output"/>
</route>
我的fuse.log文件中有以下异常
org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 20000 millis due reply message with correlationID: Camel-ID-NISB-TEC-C3880-54427-1496206891706-5-5 not received on destination: temp-queue://ID:NISB-TEC-C3880-54424-1496206882676-7:1:1. Exchange[ID-TEC-1496206891706-5-4]
at org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:153)[246:org.apache.camel.camel-jms:2.17.0.redhat-630077]
at org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onTimeout(TemporaryQueueReplyHandler.java:62)[246:org.apache.camel.camel-jms:2.17.0.redhat-630077]
答案 0 :(得分:1)
默认情况下,Web服务调用是InOut,当您发送到ActiveMQ时,它会传达相同的样式,因此它会指向您不会收到的回复消息,因此您会看到该异常。
因此,如果您要向ActiveMQ发送InOnly(fire and forget)消息,则需要指定
<to id="_to3" uri="activemq:queue:in.incident.report"/>
应该是
<to id="_to3" pattern="InOnly" uri="activemq:queue:in.incident.report"/>
详情请见: - http://camel.apache.org/event-message.html - http://camel.apache.org/request-reply.html