camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: How to route a message based on a criteria??
Date Thu, 17 Jul 2008 12:25:00 GMT
Use an expression to define the sticky load balancer. Though the only
downside is there's no easy way to do that in XML :)

Ideally we'd have some XML like

<stickyLoadBalancer
id="foo"><xpath>/foo/bar</xpath></stickyLoadBalancer> but we've not go
that yet I'm afraid, so you'd have to write your own Factory Bean for
now to configure the Expression instance.


2008/7/17 buchnerm <markus.buchner@gmx.at>:
>
> Hi thanks for the reply but i think i need an sticky load balancer - so how
> can i define this one in xml to listen to the sessionid ??
>
> http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/processor/loadbalancer/StickyLoadBalancer.html
>
> greetings max
>
>
>
> buchnerm wrote:
>>
>> Hi I am trying to implement a small load balancer based on the session id
>>
>> so if sessionid % 3 = 0 --> send it to seda0
>> if sessionid % 3 = 1 --> send it to seda1
>> if sessionid % 3 = 2 --> send it to seda2
>>
>> is that possible?
>>
>> how to cnfigure this in spring xml??
>>
>> something like this but???
>> *********
>> <route>
>>             <from
>> uri="jetty:http://localhost:9090/GreeterContext/GreeterPort"/>
>>             <loadBalance ref="roundRobinRef">
>>               <to uri="direct:EndpointA"/>
>>               <to uri="direct:EndpointB"/>
>>             </loadBalance>
>>         </route>
>> *********
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/How-to-route-a-message-based-on-a-criteria---tp18506590s22882p18506985.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message