camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LeRoy Michel <leroy...@googlemail.com>
Subject Set timeout of an http endpoint
Date Wed, 03 Jun 2009 13:09:04 GMT
Hi,

I would like to set the timeout of an http connection using camel http
component.
I read the the Camel http guide (http://camel.apache.org/http.html) and I've
tried  the following but it  doesn't work:

public void process(Exchange exchange) throws Exception {

            Map<String, Object> headers = exchange.getIn().getHeaders();
            headers.put(HttpProducer.QUERY,
"httpClient.soTimeout=150&httpClient.connectionTimeout=150");
            template.sendBodyAndHeaders("http://myserver:8080", exchange,
headers);
}

I've also tried the following :

public void process(Exchange exchange) throws Exception {
            template.send("
http://myserver:8080?httpClient.soTimeout=150&httpClient.connectionTimeout=150",
exchange)
}

Can you show me how I set the timeout of the HTTP connection in Camel 1.x

Thanks
Leroy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message