-
1. Re: Cluster Load Balancing Policy - Server Side
jbertram Mar 25, 2013 6:39 PM (in response to johnnysoccer)The closest thing you can get to what you want is setting foward-when-no-consumers to false. See http://docs.jboss.org/hornetq/2.3.0.CR1/docs/user-manual/html/clusters.html#clusters.cluster-connections.
-
2. Re: Cluster Load Balancing Policy - Server Side
johnnysoccer Mar 27, 2013 11:09 AM (in response to jbertram)We already use forward-when-no-consumers to false.
In our particular scenario, we are using a cluster, and each client (durable subscriptions) maintains a primary and secondary connection to the cluster, only using one of those connections at a time. The situation we have, is that when that client is disconnected for whatever reason, messages published for that client then round-robin between the to durable subscriptions on the cluster. When the client reconnects, we can wait for the redistribution-delay to kick in to move all messages to the active connection, but then they are out-of-order from the way they were originally published, which is a problem.
We are essentially doing a poor mans HA, but without having to commit resources to a passive backup server. What would be nice is to have the option of plugging in a load balancing policy on the server side, and in our case, when there are no active connections, just use a policy that picks one of the queue's and sends all the messages there, that way we can maintain ordering based on how the data was published.
-
3. Re: Cluster Load Balancing Policy - Server Side
ataylor Mar 27, 2013 11:55 AM (in response to johnnysoccer)You could use message grouping, this will pin messages to a particular node and then pin them on that node to a specific consumer. You have to make sure that redistribution is disabled when using this feature.