Org.apache.camel.ExchangeTimedOutException: OUT message was not received internally: 30000 millis
I am trying to open a web service using esb + apache camel + seda / activemq fuse and I am facing an issue keeping a state message to invoke the web service.
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>
When I make a request to a web service using soapUI, when going to timeout:
Exhausted after delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis.
Reason for stacktrace:
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
I have the same result using seda or activemq as a consumer, but it works fine with a file consumer.
I am using apache-servicemix-4.4.1-fuse-02-05 version.
Any idea what I am doing wrong? Thank you for your help.
source to share
When you post message to seda endpoint using
<to uri="seda:OpCon.MSGIN" />
And the message comes from a web service, then the message uses InOut as a Message Exchange Patterh (like request / response), which means Camel is waiting for a "response" from seda's queue, in the sense that it will wait to process the message. But since the message is not being processed, a timeout of 30 seconds is triggered and why are you seeing this exception. See timeout options at: http://camel.apache.org/seda
Instead, it looks like you want to send back an OK message to the web service as soon as possible, posting the message to the queue for asynchronous further processing. There is an EIP for that, and its WireTap is an EIP. So use this instead: http://camel.apache.org/wire-tap
<wireTap uri="seda:OpCon.MSGIN" />
source to share