camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desenfoque <>
Subject TimeOut in ConsumerTemplate not working (Takes forever)
Date Wed, 03 May 2017 18:45:55 GMT

I have a processor with this ConsumerTemplate:

ConsumerTemplate consumerCorr =
String URI_CORR =

*String respCorr = consumerCorr.receiveBody(URI_CORR,10000,String.class);*

I'm expecting a 10 seconds timeout, but I have to wait a lot (several
minutes) and I get this Exception

Connection timed out


but I was expecting a *null * because the documentation says that:

<String> String org.apache.camel.ConsumerTemplate.receiveBody(String
endpointUri, long timeout, Class<String> type)

Receives from the endpoint, waiting until there is a response or the timeout
Type Parameters:
Parameters:endpointUri the endpoint to receive from
timeout timeout in millis to wait for a response
type the expected response type

*Returns:the returned response body, or null if no response*

What is happening? I'm using the ComsumerTemplate wrong??

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message