Session affinity load balancing proxy problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Session affinity load balancing proxy problem

Hi all,

       I try Sample 54: Session affinity load balancing between 3 endpoints, and it works perfectly.

       I need change it to a proxy, which set the soap header(ClientID)  according to the input message.

       So I set up a proxy below:

       <?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="" name="LBSTest" transports="http" startOnLoad="true" trace="disable">
            <log level="custom">
                <property xmlns:ser="http://services.samples" name="userId" expression="//ser:sampleOperation/ser:param"/>
            <header xmlns:syn="" xmlns:ser="http://services.samples" name="syn:ClientID" expression="//ser:sampleOperation/ser:param"/>
            <log level="full"/>
                    <loadbalance algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin">
                            <address uri="http://localhost:9001/services/LBService1">
                            <address uri="http://localhost:9002/services/LBService1">
                    <session type="simpleClientSession">
The LoadbalanceFailoverService is not changed, and I use the value of the //ser:sampleOperation/ser:param as a ClinetID. I send a message Using soapUI, and the ESB log is below:
[2012-01-04 15:37:35,875]  INFO - LogMediator To: /services/LBSTest, WSAction: u
rn:sampleOperation, SOAPAction: urn:sampleOperation, MessageID: urn:uuid:ab4ae41
a-463b-4b6f-b4d3-3cac072d76e6, Direction: request, Envelope: <?xml version='1.0'
 encoding='utf-8'?><soap:Envelope xmlns:soap="
elope" xmlns:ser="http://services.samples"><soap:Header><syn:ClientID xmlns:syn=

But it seems doesn't work, The first C1 message is sent to MyServer1, and the second C1 message is sent to MyServer2.

Any suggestion?


博客:RocWing's Blog

Esb-java-user mailing list
[hidden email]