I have a question about "How to set CAMEL rest services 's timeout" Not the httpclient's timeout setting. Ex:
rest("/say")
.get("/hello").to("direct:hello")
from("direct:hello")
**//start action**
.setHeader(Exchange.HTTP_METHOD, constant("GET"))
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
...
exchange.getOut().setBody(answer);
}
});
.some check function
.toD("http4://xxxxxx")
.transform().XXX
.setHeader(xxxx);
**//end action**
If someone call the GET../say/hello, the time from start action to end action may be take too long. this service will cancel the request itself. (So I need to set the timeout time ,and than to handle the response's massage).
I don't know how to do it or any keyword/component that I can use.
Can someone help me out with this? Thanks