You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ravi <ra...@gmail.com> on 2011/06/07 19:02:41 UTC

Camel ExchangeTimedOutException

Hi,

We are using Apache ServiceMix (4.3.0-fuse-02-00) which is using Apache
Camel(2.4.0.fuse-01-00)  and we have services deployed in it. This services
uses camel to communicate we each other through camel routes and are
configured as below sample.

<!-- These routes are outbound to other services -->
<route>
<from uri="direct:com.config"/>
<bean ref="enrichOutboundExchangeRef"/>
<to uri="activemq:queue:com.config?transferException=true"/>
</route>

<!-- These routes are inbound to this service from all other services -->
<route>
<from uri="activemq:queue:com.config?transferException=true"/>
<to uri="log:com.config.request?level=DEBUG"/>
<bean ref="processInboundExchangeEnrichmentsRef"/>
<bean ref="configServiceImpl"/>
<to uri="log:com.config.response?level=DEBUG"/>
</route>

In the service, it is consumed as below
@Produce(uri = "direct:com.config")
private ConfigService configService;

We are facing timeout issues when Service A calls Service B which calls
Service C at Service B. The call from Service A to Service B is a simple
call of validation which is done at Service C(Service B just forwads the
request to Service C).Below is exceptions thrown in servicemix.log.Attached
the complete log.
17:49:56,333 | DEBUG | qtp-10530939-301 | OutboundExchangeProcessor | ? ? |
147 - com.Common - 1.0.0.SNAPSHOT | Enrich Exchange with properties and
headers
17:49:56,334 | WARN | qtp-10530939-301 | BrokerRegistry | ? ? | 43 -
org.apache.activemq.activemq-core - 5.4.1.fuse-00-00 | Broker localhost not
started so using default instead
17:50:16,586 | ERROR | qtp-10530939-301 | DefaultErrorHandler | ? ? | 69 -
org.apache.camel.camel-core - 2.4.0.fuse-01-00 | Failed delivery for
exchangeId: 5b161695-caab-4165-9d4e-67a7d201b17d. Exhausted after delivery
attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The OUT
message was not received within: 20000 millis. ExchangeMessage:
BeanInvocation public abstract void
com.service.task.config.ConfigService.authenticateIPAddress(java.lang.String,com.model.config.Component[)
with [10.68.221.69, Lcom.model.config.Component;@1fec9db]]
org.apache.camel.ExchangeTimedOutException: The OUT message was not received
within: 20000 millis. ExchangeMessage: BeanInvocation public abstract void
com.service.task.config.ConfigService.authenticateIPAddress(java.lang.String,com.model.config.Component[)
with [10.68.221.69, Lcom.model.config.Component;@1fec9db]]
at
org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:265)

This issue we are seeing intermittenlty not sure of the exact reason why it
happens. Since the servicemix.log is kinda of last resort for the logs and
also we doubting where the concurrentConsumers(as shown below) is having any
impact on this since we have specified to be 5 if we have 5 consumers at
that point of time and 6th consumer will wait and might get timeout by 20
Secs if does not get handle to the queue. How to really rootcause this issue
since the operation we are doing takes hardly a 1 or 2 Secs and default
timeout is 20 Secs(20000 millis). Not sure if just by increasing the
concurrentConsumers will solve this problems.

<bean id="jmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="jmsConnectionFactory"/>
<property name="concurrentConsumers" value="5"/>
</bean>

I posted same @
http://fusesource.com/forums/thread.jspa?threadID=2981&tstart=15

Thanks
Ravi