I have read the thread you suggest carefully, and still cannot get the
timeout settings for the cxfrs client to be acknowledged. I am new to Camel,
so I might very well be missing something obvious :)

This is what I add to my spring config file:
<beans xmlns:http-conf= "...
http://cxf.apache.org/transports/http/configuration";
        xsi:schemaLocation="... 
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd ">
                
        <http-conf:conduit name="*.http-conduit">
                <http-conf:client AsyncExecuteTimeout="600000" 
ReceiveTimeout="600000"/>
        </http-conf:conduit>

        <camelContext trace="true" id="CamelContext"
                xmlns="http://camel.apache.org/schema/spring";>          
                <camel:routeBuilder ref="MyRouteBuilder" />
        </camelContext>

And here is my RouteBuilder:
@Singleton
@Component
@Named("MyRouteBuilder")
public class MyRouteBuilder extends RouteBuilder {

    @Override
    public void configure() {

// Code for marshaling, which I don't think is relevant to the question...

from(
               
"activemq:requestBatchKeys?errorHandlerLoggingLevel=ERROR&errorHandlerLogStackTrace=false")
                .routeId("amq_requestBatchKeys")
                .shutdownRoute(ShutdownRoute.Defer).marshal(batchDataFormat)
                .convertBodyTo(String.class, "UTF-8")
                .setHeader("CamelHttpMethod", simple("POST"))
                .setHeader("Content-Type", simple("application/json"))
                .to("cxfrs://http://${keysRestServer}/licensekey/batch";);

}
}

It works for some requests, but for large requests I get 
org.apache.cxf.interceptor.Fault: Could not send Message.
and further down the stack trace it says
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking
http://xx.xx.x.xxx:8080/keys/rest/licensekey/batch: Read timed out

How do you hook up the HTTPConduit configuration to the Camel CXFRS
component?


Charles Moulliard-2 wrote
> HTTPConduit of CXF must be configured in this case :
> http://cxf.547215.n5.nabble.com/What-is-the-proper-way-of-setting-client-Timeout-per-Webservice-method-td5727106.html
> 
> -- 
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io





--
View this message in context: 
http://camel.465427.n5.nabble.com/Timeouts-in-CXFRS-tp5741142p5741438.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to