Hi, I want to perform a sticky based load balancing based on the SOAP session ID in the response. As camel's loadbalance.sticky() just check for the expression in the request, I have to implement my own custom load balancer.
I gave a look at camel in action book and the information provided in the section 8.6.4(Custom load balancer section) are two less. With the help of the developer(Claus) in the fuse source forum, I decided to plug in my own custom load balancer. The Problems I am facing now are: 1. There are two methods in custom based load balancer: Process and other is choosing a processor: I know I have to plugin my own logic in the choosing processor method. But how would my logic look like? I want to extract the session id from the response(Just the response), and match this session id with the second request I get from the client(If they are same i would forward the request to same processor). 2.In order to get the session from the response I came up with something like this: String expression = (String) exchange.getOut().getHeader("ServiceGroupId", env.xpath("substring(string(/soapenv:Envelope/soapenv:Header/wsa:ReplyTo/wsa:ReferenceParameters/axis2:Serv‌ iceGroupId/text()), 10)", String.class)); If i am not wrong it would pick the session id from the response. (Now where should I add this code?) In the process method or choose processor method? 3. If I add this code in my choose processor method, how would my process method look like? I would really appreciate if anyone could give me an outline "On how to join the dots in camel". -- View this message in context: http://camel.465427.n5.nabble.com/Using-a-custom-based-load-balancer-tp5719841.html Sent from the Camel - Users mailing list archive at Nabble.com.