Hello All.
I need the following from synapse: I have client, that is calling synapse proxy with different paths, say http://localhost:8080/dbService and http://localhost:8080/registerUser. And I have 5 the same servers, which can receive requests of form like: http://localhost:8091/te/processes/dbService and http://localhost:8091/te/processes/registerUser. I need synapse to work as a balancer, but I don't want to write something like that for every service:

<filter source="get-property('To')" regex=".*/dbService$">
               <endpoint>
                   <loadbalance>
                       <endpoint>
<address uri="http://localhost:8091/te/processes/dbService";> <suspendDurationOnFailure>60</suspendDurationOnFailure>
                           </address>
                       </endpoint>
                       <endpoint>
<address uri="http://localhost:8092/te/processes/dbService";> <suspendDurationOnFailure>60</suspendDurationOnFailure>
                           </address>
                       </endpoint>
                       <endpoint>
<address uri="http://localhost:8093/te/processes/dbService";> <suspendDurationOnFailure>60</suspendDurationOnFailure>
                           </address>
                       </endpoint>
                       <endpoint>
<address uri="http://localhost:8094/te/processes/dbService";> <suspendDurationOnFailure>60</suspendDurationOnFailure>
                           </address>
                       </endpoint>
                       <endpoint>
<address uri="http://localhost:8095/te/processes/dbService";> <suspendDurationOnFailure>60</suspendDurationOnFailure>
                           </address>
                       </endpoint>
                   </loadbalance>
               </endpoint>
</filter>

Is there a way to construct balancer endpoint dynamically for this case? Something like: <property name="toservice" action="set" expression="fn:substring-after(synapse:get-property('To'),':8080/')"/>
And then append this property to base endpoint chosen by balancer?

Reply via email to