Hi, I have a camel route where I am setting Exchange.DESTINATION_OVERRIDE_URL header to set a dynamic endpoint url to cxfrs producer component.
Issue with that is lot of times url from previous exchanges is getting set instead of the freshly calculated url for the current exchange. In order to fix the issue, I had to configure maxClientCacheSize = 1 on the cxfrs component. Below information from http://camel.apache.org/cxfrs.html. New in 2.6, you can set a IN message header CamelDestinationOverrideUrl to dynamically override the target destination Web Service or REST Service defined in your routes. The implementation caches CXF clients or ClientFactoryBean in CxfProvider and CxfRsProvider. This option allows you to configure the maximum size of the cache. I looked at the JAXRSClientFactoryBean code where it caches ClientFactoryBean but not getting what caused this issue. was causing issue in the first place. please suggest. sample trace log for one of the addresses: [TRACE]: org.apache.camel.component.cxf.CxfEndpointUtils - Client address is overridden by header 'CamelDestinationOverrideUrl' to value ' https://api.dev.foo.com/dev-ecbo/event/12345/survey?%26%24select%3DQuestion&$expand=Question%28%24filter%3DHelp+eq+%27What+department+are+you+in%3F%27+or+Help+eq+%27What+industry+are+you+in%3F%27+or+Help+eq+%27What%E2%80%99s+your+job+level%3F%27+%29&$filter=+%28Question%2Fany%28x%3A+x%2FHelp+eq+%27What+department+are+you+in%3F%27%29+or+Question%2Fany%28x%3A+x%2FHelp+eq+%27What+industry+are+you+in%3F%27%29+or+Question%2Fany%28x%3A+x%2FHelp+eq+%27What%E2%80%99s+your+job+level%3F%27%29%29 ' Thanks, Sowjanya.