Hi Alexey, For the moment, loadbalance endpoint need statically declared set of endpoints for it to do the loadbalance correctly due to few reasons explained below;
- Proxy Service might map a service with different names than the one of the proxy - Sometimes the load may be balanced with different services having very different names an so on But, this also can be done by introducing a new endpoint type to pick the endpoint address or part of the address from the current message rather than specifying them statically. URLRewrite mediator will be a good solution to change the addresses of the messages. Is this critical to you? (You may go ahead and create a JIRA for this) Thanks, Ruwan On Tue, Apr 22, 2008 at 10:26 AM, Alexey Ousov <[EMAIL PROTECTED]> wrote: > 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? > -- Ruwan Linton http://www.wso2.org - "Oxygenating the Web Services Platform"
