You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by apara <ap...@standardset.com> on 2015/04/29 15:53:27 UTC

org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis

All my beans in the route implement this interface:

public interface Handler {
    EventData handle(EventData data) throws HandlerException;
}

They are all exported via camel:export and the following works nicely:

        <camel:route>
            <camel:from uri="direct://handle.event" />
            <camel:to uri="direct://eventDataLogger"/>
            <camel:to uri="direct://duplicateEventChecker" />
            <camel:to uri="direct://dateTransformation"/>
            <camel:to uri="direct://userAgentParser" />
            <camel:to uri="direct://pageToIdEventAssociation"/>
            <camel:to uri="direct://bufferedEventInsertAugmentation"/>
            <camel:to uri="direct://playerStartUpEventAugmentation"/>
            <camel:to uri="direct://loadStartToPreviousLoadstartAssociation"
/>
            <camel:to uri="direct://insertPlaySuccessAfterTimeupdate" />
            <camel:to
uri="direct://bufferedEventToPreviousLoadStartAssociation" />
            <camel:to uri="direct://mongoDBPersistence"/>
        </camel:route>

In an effort to add some concurrency, I changed all instances of direct://
to vm://  now I am getting:

The OUT message was not received within: 30000 millis. Exchange[Message:
BeanInvocation public abstract com.mediaplatform.cdc.event.EventData
com.mediaplatform.cdc.consumer.process.handler.Handler.handle(com.mediaplatform.cdc.event.EventData)
throws
com.mediaplatform.cdc.consumer.process.handler.exception.HandlerException
with [EventDataImpl{id='null', partitionKey='constant',
vd=VariableDataImpl{} {T=pl, ts=2015-04-29T13:31:28.182Z, ua=Mozilla/5.0
(Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/41.0.2272.104 Safari/537.36,
eid=0973e910-97a5-4f65-99e8-c9d2f92cee1d, av=5.0 (Macintosh; Intel Mac OS X
10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104
Safari/537.36}}]]]

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              Pro...Id   Processor                                                                          
Elapsed (ms)
[route2            ] [route2 ] [vm://handle.event                                                            
] [     30006]
[route2            ] [to1      ] [vm://eventDataLogger                                                      
] [     30005]

I still want the semantics of result of one handler passed to the next and I
want to handle the messages sequentially (without race conditions), however,
I wanted to have multiple stops on the route processing messages
concurrently as opposed to waiting for a single message to be handled
through entire route before starting work on the next message.

I kinda envision this as multiple messages bubbling through the route
instead of a single message shooting through it one at a time.

Is there a different pattern that I should try?

Thanks.
-AP_ 






--
View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-ExchangeTimedOutException-The-OUT-message-was-not-received-within-30000-millis-tp5766508.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis

Posted by yogu13 <yo...@gmail.com>.
Hi,

Taking a shot to explain what is happening here...
>From what i understand using vm option with an "to" endpoint would only add
the messages to the SEDA queue (maintained internally), I am not sure if you
have any other route which picks up these messages to process and hence it
ends up throwing a timeout exception. 

"I kinda envision this as multiple messages bubbling through the route
instead of a single message shooting through it one at a time." -> what
makes you think only one message is processed ?

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-ExchangeTimedOutException-The-OUT-message-was-not-received-within-30000-millis-tp5766508p5766541.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis

Posted by apara <ap...@standardset.com>.
I spent a day trying to figure this out with no luck.

I re-read the threading chapter in Camel in Action book, but could not find
how to multi-thread vm:// or seda:// routes.  Perhaps I need to go back to
using direct:// with some threading option.  I just don't know.

I tried using:

vm://
seda://
?concurrentConsumers=3 
threadPools
threadPoolProfile
camel:inOut vs camel:to
camel:outOnly

I tried reducing my route:
        <camel:route>
            <camel:from uri="seda://handle.event?concurrentConsumers=3" />
            <camel:inOnly
uri="seda://eventDataLogger?concurrentConsumers=3"/>

But still NOTHING works.  The very first message is STUCK in the first
endpoint and 30 seconds later I get a the OUT message was not received.  

Using direct:// works great, it feels that simply replacing direct with
vm:// should work equally as well, but it just gets stuck on the first
endpoint.

I am sure it's working for everyone else here, and this seems so basic, so
why am I not getting it?

Any help, would be so greatly appreciated.

Thanks.
-AP_



--
View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-ExchangeTimedOutException-The-OUT-message-was-not-received-within-30000-millis-tp5766508p5766527.html
Sent from the Camel - Users mailing list archive at Nabble.com.