-
1. Re: Implementing custom client-side load balancing policy in hornetq
ataylor Sep 15, 2011 8:55 AM (in response to sami_gh)1 of 1 people found this helpfulAt the moment your restricted to the api
int select (int max);.
You can raise a jira if you want to add extra functionality but its doubtful we'll get time to do it in the near future. You could always provide your own patch!
-
2. Re: Implementing custom client-side load balancing policy in hornetq
sami_gh Sep 15, 2011 9:08 AM (in response to ataylor)I thought so. Thanks Andy for the response.
-
3. Re: Implementing custom client-side load balancing policy in hornetq
clebert.suconic Sep 15, 2011 12:14 PM (in response to sami_gh)This is an easy change but requires API change.
One would need to change the select method to:
public interface ConnectionLoadBalancingPolicy
{
/**
* Returns the selected index according to the policy implementation.
*
* @param max maximum position index that can be selected
*/
int select(Pair<TransportConfiguration, TransportConfiguration>[] topologyArray);
}
and make the adjustments on the implementation.
-
4. Re: Implementing custom client-side load balancing policy in hornetq
bruceas Dec 18, 2012 3:08 PM (in response to clebert.suconic)Have there been any update to this issue?
I too would like to know the address of the nodes (and how they match to the return value) before making a selection.
Thanks
-
5. Re: Implementing custom client-side load balancing policy in hornetq
jbertram Dec 18, 2012 5:50 PM (in response to bruceas)I don't think so. The interface looks the same as it always has - https://github.com/hornetq/hornetq/blob/master/hornetq-core-client/src/main/java/org/hornetq/api/core/client/loadbalance/ConnectionLoadBalancingPolicy.java.
Patches welcome.