You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lekkie <le...@gmail.com> on 2010/06/03 14:26:27 UTC

Re: ExchangeTimedOutException: The OUT message was not received within: 20000 millis.

I eventually figured this put.

I had to wiretap the response.

THanks.


Claus Ibsen-2 wrote:
> 
> Are you sending request/reply or fire and forget messaging over JMS?
> 
> When you get that 20 sec timeout then its because Camel uses InOut and
> expects a reply being send back to JMSReplyTo.
> 
> See
> http://camel.apache.org/event-message.html
> http://camel.apache.org/request-reply.html
> 
> On Thu, Jun 3, 2010 at 10:28 AM, lekkie <le...@gmail.com> wrote:
>>
>> Hi Guys,
>>
>> I have this requirement where the source queue and destination queue are
>> on
>> separate brokers. See the config below:
>>
>> <bean id="requestJMSConnectionFactory"
>> class="org.apache.activemq.ActiveMQConnectionFactory">
>>                <property name="alwaysSessionAsync" value="false"/>
>>                <property name="alwaysSyncSend" value="true"/>
>>                <property
>> name="brokerURL"><value>${request-queue-url}</value></property>
>>                <property name="clientID" value=""/>
>>                <property name="closeTimeout" value="15000"/>
>>                <property name="copyMessageOnSend" value="true"/>
>>                <property name="disableTimeStampsByDefault"
>> value="false"/>
>>                <property name="dispatchAsync" value="false"/>
>>                <property name="objectMessageSerializationDefered"
>> value="false"/>
>>                <property name="optimizeAcknowledge" value="false"/>
>>                <property name="optimizedMessageDispatch" value="true"/>
>>                <property name="password" value=""/>
>>                <property name="producerWindowSize" value="0"/>
>>                <property name="statsEnabled" value="false"/>
>>                <property name="useAsyncSend" value="false"/>
>>                <property name="useCompression" value="false"/>
>>                <property name="useRetroactiveConsumer" value="false"/>
>>                <property name="userName" value=""/>
>>                <property name="watchTopicAdvisories" value="true"/>
>>                <property name="sendTimeout" value="0"/>
>>                <property name="redeliveryPolicy" ref="redeliveryPolicy"/>
>>        </bean>
>>
>>        <bean id="responseJMSConnectionFactory"
>> class="org.apache.activemq.ActiveMQConnectionFactory">
>>                <property name="alwaysSessionAsync" value="false"/>
>>                <property name="alwaysSyncSend" value="true"/>
>>                <property
>> name="brokerURL"><value>${response-queue-url}</value></property>
>>                <property name="clientID" value=""/>
>>                <property name="closeTimeout" value="15000"/>
>>                <property name="copyMessageOnSend" value="true"/>
>>                <property name="disableTimeStampsByDefault"
>> value="false"/>
>>                <property name="dispatchAsync" value="false"/>
>>                <property name="objectMessageSerializationDefered"
>> value="false"/>
>>                <property name="optimizeAcknowledge" value="false"/>
>>                <property name="optimizedMessageDispatch" value="true"/>
>>                <property name="password" value=""/>
>>                <property name="producerWindowSize" value="0"/>
>>                <property name="statsEnabled" value="false"/>
>>                <property name="useAsyncSend" value="false"/>
>>                <property name="useCompression" value="false"/>
>>                <property name="useRetroactiveConsumer" value="false"/>
>>                <property name="userName" value=""/>
>>                <property name="watchTopicAdvisories" value="true"/>
>>                <property name="sendTimeout" value="0"/>
>>                <property name="redeliveryPolicy" ref="redeliveryPolicy"/>
>>        </bean>
>>
>>        <bean id="requestJMSTransactionManager"
>> class="org.springframework.jms.connection.JmsTransactionManager">
>>            <property name="connectionFactory"
>> ref="requestJMSConnectionFactory" />
>>        </bean>
>>
>>        <bean id="responseJMSTransactionManager"
>> class="org.springframework.jms.connection.JmsTransactionManager">
>>            <property name="connectionFactory"
>> ref="responseJMSConnectionFactory"
>> />
>>        </bean>
>>
>>
>>        <bean id="requestJMSConfig"
>> class="org.apache.camel.component.jms.JmsConfiguration">
>>            <property name="connectionFactory"
>> ref="requestJMSConnectionFactory"/>
>>            <property name="transactionManager"
>> ref="requestJMSTransactionManager"/>
>>            <property name="transacted" value="true"/>
>>            <property name="concurrentConsumers" value="2"/>
>>            <property name="timeToLive" value="86400000"/>
>>                <property name="deliveryPersistent" value="true"/>
>>                <property name="explicitQosEnabled" value="true"/>
>>                <property name="priority" value="9"/>
>>                <property name="transactedInOut" value="true"/>
>>        </bean>
>>
>>        <bean id="responseJMSConfig"
>> class="org.apache.camel.component.jms.JmsConfiguration">
>>            <property name="connectionFactory"
>> ref="responseJMSConnectionFactory"/>
>>            <property name="transactionManager"
>> ref="responseJMSTransactionManager"/>
>>            <property name="transacted" value="true"/>
>>            <property name="concurrentConsumers" value="2"/>
>>            <property name="timeToLive" value="86400000"/>
>>                <property name="deliveryPersistent" value="true"/>
>>                <property name="explicitQosEnabled" value="true"/>
>>                <property name="priority" value="9"/>
>>                <property name="transactedInOut" value="true"/>
>>        </bean>
>>
>>        <bean id="REQUEST_PROPAGATION_REQUIRED"
>> class="org.apache.camel.spring.spi.SpringTransactionPolicy">
>>            <property name="transactionManager"
>> ref="requestJMSTransactionManager"/>
>>            <property name="propagationBehaviorName"
>> value="PROPAGATION_REQUIRED"/>
>>        </bean>
>>
>>        <bean id="RESPONSE_PROPAGATION_REQUIRED"
>> class="org.apache.camel.spring.spi.SpringTransactionPolicy">
>>            <property name="transactionManager"
>> ref="responseJMSTransactionManager"/>
>>            <property name="propagationBehaviorName"
>> value="PROPAGATION_REQUIRED"/>
>>        </bean>
>>
>>        <bean id="REQUEST_TEMPLATE_PROPAGATION_REQUIRED"
>> class="org.springframework.transaction.support.TransactionTemplate">
>>            <property name="transactionManager"
>> ref="requestJMSTransactionManager"/>
>>        </bean>
>>
>> <bean id="requestJMS"
>> class="org.apache.camel.component.jms.JmsComponent">
>>                <property name="configuration" ref="requestJMSConfig"/>
>>        </bean>
>>
>>        <bean id="responseJMS"
>> class="org.apache.camel.component.jms.JmsComponent">
>>                <property name="configuration" ref="responseJMSConfig"/>
>>        </bean>
>>
>> <osgi:camelContext xmlns="http://camel.apache.org/schema/spring"
>> trace="true">
>>        <endpoint id="srcJMS" uri="requestJMS:${request-queue}"/>
>>        <endpoint id="dstJMS" uri="responseJMS:${response-queue}"/>
>>    <route>
>>        <from ref="srcJMS"/>
>>        <policy ref="REQUEST_PROPAGATION_REQUIRED"/>
>>        <to uri="nmr:router1"/>
>>        <to ref="dstJMS"/>
>>    </route>
>>  </osgi:camelContext>
>>
>> Each time the response is dropped into the responseQueue I get this
>> message
>> and it tries to requeue the message into the response queue which makes
>> it
>> enqueue multiple responses.
>>
>> Here is the exception thrown:
>> org.apache.camel.ExchangeTimedOutException: The OUT message was not
>> received
>> within: 20000 millis. Exchange[JmsMessage:
>> at
>> org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:265)
>>        at
>> org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:147)
>>        at
>> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
>>        at
>> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
>>        at
>> org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
>>        at
>> org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
>>        at
>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
>>        at
>> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
>>        at
>> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
>>        at
>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:161)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
>>        at
>> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
>>        at
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
>>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
>>        at
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
>>        at
>> org.apache.camel.spring.spi.TransactionErrorHandler.access$001(TransactionErrorHandler.java:39)
>>
>> Kind help out.
>>
>> --
>> View this message in context:
>> http://old.nabble.com/ExchangeTimedOutException%3A-The-OUT-message-was-not-received-within%3A-20000-millis.-tp28764712p28764712.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/ExchangeTimedOutException%3A-The-OUT-message-was-not-received-within%3A-20000-millis.-tp28764712p28766749.html
Sent from the Camel - Users mailing list archive at Nabble.com.