org.apache.camel.ExchangeTimedOutException:该OUT邮件未收到内:30000米利斯 [英] org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis

查看:1001
本文介绍了org.apache.camel.ExchangeTimedOutException:该OUT邮件未收到内:30000米利斯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用保险丝ESB + Apache的骆驼暴露一个We​​b服务+ SEDA / ActiveMQ的,我面临的一个问题returing状态消息给Web服务调用。

I'm trying to expose a web service using fuse esb + apache camel + seda/activemq and I'm facing to an issue returing a status message to the web service call.

这里是我的简单的骆驼路线:

here is my simple camel route :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/cxf"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
    http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">

    <cxf:cxfEndpoint id="msgInEndpoint" address="http://localhost:9000/msgin/"
        serviceClass="com.test.jaxws.MsgInEndpoint">
    </cxf:cxfEndpoint>

    <camelContext xmlns="http://camel.apache.org/schema/spring">
        <route id="control">
            <from uri="cxf:bean:msgInEndpoint" />
            <to uri="log:incomingMsgIn" />
            <to uri="seda:OpCon.MSGIN" />
            <transform>
                <constant>OK</constant>
            </transform>
        </route>
    </camelContext>
</beans>

当我使用的soapUI Web服务请求,要超时问题:

When I do a web service request using soapUI, in going to a timeout issue :

Exhausted after delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis. 

该堆栈跟踪原因:

The stacktrace cause :

Caused by: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis. Exchange[Message: $CONSOLE:DISPLAY,test]
    at org.apache.camel.component.seda.SedaProducer.process(SedaProducer.java:112)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:284)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.fabric.FabricTraceProcessor.process(FabricTraceProcessor.java:59)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:306)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:116)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:79)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:139)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:106)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[89:org.apache.camel.camel-core:2.8.0.fuse-02-05]
    at org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:88)[143:org.apache.camel.camel-cxf:2.8.0.fuse-02-05]
    at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:68)[143:org.apache.camel.camel-cxf:2.8.0.fuse-02-05]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[133:org.apache.cxf.bundle:2.4.3.fuse-01-02]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_26]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_26]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_26]
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[133:org.apache.cxf.bundle:2.4.3.fuse-01-02]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[133:org.apache.cxf.bundle:2.4.3.fuse-01-02]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[133:org.apache.cxf.bundle:2.4.3.fuse-01-02]
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[133:org.apache.cxf.bundle:2.4.3.fuse-01-02]
    at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:319)[133:org.apache.cxf.bundle:2.4.3.fuse-01-02]
    at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:287)[133:org.apache.cxf.bundle:2.4.3.fuse-01-02]
    at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)[133:org.apache.cxf.bundle:2.4.3.fuse-01-02]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:939)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
    at org.eclipse.jetty.server.Server.handle(Server.java:346)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:438)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
    ... 8 more

我在使用镇静或ActiveMQ的消费同样的结果,但它工作正常文件的消费者。

I have the same result using seda or activemq as consumer, but it works fine with file consumer.

我在Apache的ServiceMix的-4.4.1-熔断器02-05版本。

I'm on apache-servicemix-4.4.1-fuse-02-05 version.

我做错了任何想法?
感谢您的帮助。

Any idea of what I'm doing wrong? Thanks for your help

推荐答案

当您使用发送邮件到SEDA端点

When you send the message to the seda endpoint using

<to uri="seda:OpCon.MSGIN" />

和消息来源于形成一个Web服务,那么该消息被使用的InOut的消息交换Patterh(如请求/应答),这意味着骆驼期待从SEDA队列中的答复,在这个意义上它会等待该消息以进行处理。但作为不处理的消息,然后在30秒的超时被触发,为什么你看到的例外。见超时选项为: http://camel.apache.org/seda

And the message originates form a web service, then the message is using InOut as the Message Exchange Patterh (eg request/reply), which means Camel is expecting a 'reply' from the seda queue, in the sense it will wait for the message to be processed. But as the message is not processed, then a timeout of 30 sec is triggered, and why you see that exception. See the timeout options at: http://camel.apache.org/seda

相反,它看起来像你想尽快回OK消息发送到Web服务,同时将消息发送到一个队列异步进一步处理。有一个EIP是什么,以及它的窃听EIP。所以使用来代替: http://camel.apache.org/wire-tap

Instead it looks like you want to send back asap an OK message to the web service, while sending a message to a queue for asynchronous further processing. There is an EIP for that, and its the WireTap EIP. So use that instead: http://camel.apache.org/wire-tap

<wireTap uri="seda:OpCon.MSGIN" />

这篇关于org.apache.camel.ExchangeTimedOutException:该OUT邮件未收到内:30000米利斯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆