From the link I sent before:
"Camel 2.0: Timeout in millis a seda PRODUCER will at most waiting for
an async task to complete. See waitForTaskToComplete and Async for more
details. In Camel 2.2 you can now disable timeout by using 0 or a
negative value."
Emphasis on *producer*. The "from" in the route refers to the consumer.
What you see is the expected behavior. Depending on who you ask the
Camel terminology may sound a bit backwards, but it's the one used in
the messaging space. The producer is the one who produces the message
and sends it (i.e. it's the client) to a consumer (server) to process it
and maybe (if it's not one-way, aka in-only) send back a reply. You'll
get familiar with the terminology pretty quickly though, no worries.
I hope this helps. Thanks for using Camel, enjoy the ride.
Hadrian
On 02/03/2012 09:13 PM, Krsmanovic, Dragisa wrote:
This works
Future<String> future = camel.asyncRequestBody("seda:test?timeout=60000",
"DO", String.class);
Curiously, setting timeout on the route definition seems to be ignored:
from("seda:test?timeout=60000")... does not change the default 30 sec
timeout.
Dragisa
On 2/3/12 6:04 PM, "Hadrian Zbarcea"<hzbar...@gmail.com> wrote:
Did you try: "seda:foo?timeout=60000" or whatever else you prefer (in
millis)? The default timeout is 30 sec [1].
Hadrian
[1] http://camel.apache.org/seda.html
On 02/03/2012 08:25 PM, Krsmanovic, Dragisa wrote:
Example:
Future<String> future = camel.asyncRequestBody("seda:test", "DO",
String.class);
String response = future.get(1, TimeUnit.MINUTES);
If message takes a long time to complete, future.get() always times out
after 30 sec regardless of what I set in future.get(..)
Seeing error:
Caused by: org.apache.camel.ExchangeTimedOutException: The OUT message
was not received within: 30000 millis. Exchange[Message: DO]
Are there any other parameters that I need to set if I want to wait for
response message longer than 30 sec ?
Thanks,
Dragisa Krsmanovic
--
Hadrian Zbarcea
Principal Software Architect
Talend, Inc
http://coders.talend.com/
http://camelbot.blogspot.com/
--
Hadrian Zbarcea
Principal Software Architect
Talend, Inc
http://coders.talend.com/
http://camelbot.blogspot.com/