I don't want to load balance across brokers; I want sticky load balancing across consumers, with failover. I have a network-of-brokers. The message groups documentation (http://activemq.apache.org/message-groups.html) says I can use that feature to get "high availability / auto-failover to other consumers if a JVM goes down".
I tried it and it works perfectly in normal operation, and the failover works perfectly when a jvm goes down. The problem is that when I bring the failed broker back up, the behaviour changes completely ... it no longer does "sticky load balancing across consumers" but instead seems to just load balance across all consumers, ignoring the message group. To explain what I have setup and why .... I have two JBoss instances on seperate machines. Each is running an embedded activeMQ broker. I have used static discovery to configure them as a network-of-brokers. I have one client on a third machine, using the failover protocol to send messages to the two servers. The client sets JMSXGroupID on each message to some value. I want messages with the same JMSXGroupID value to go to the same consumer (this part works). If that consumer's jvm goes down I want messages with the same JMSXGroupID value to go to a consumer on another JVM - the same consumer, consistently (this part works too). When I recover a failed JBoss instance, bringing its activeMQ broker back on-line I want messages with the same JMSXGroupID value to go to the same consumer - preferably the original one, but I don't really mind as long as its consistent ... but this part doesn't work. When the failed broker comes back on-line the JMSXGroupID is ignored and messages with the same JMSXGroupID value go to different consumers. James.Strachan wrote: > > Message Groups are a feature used within a single broker to implement > sticky load balancing across consumers. They are not intented as a way > to load balance across brokers. > > My recommendation would be to use one of the Master/Slave approaches > with Message Groups. > > On 4/20/07, prylance <[EMAIL PROTECTED]> wrote: >> >> I'm testing a HA configuration, using activeMQ 4.1.1. I have two brokers >> and >> a client sending messages with failover between the brokers. I tried >> using >> the message groups feature to ensure that messages always went to the >> same >> broker, unless that broker failed. This works well ... very cool feature. >> >> I failed one of my brokers and confirmed that subsequent messages for the >> message group were automatically redirected to the remaining broker. Then >> I >> brought my failed broker back up, and sent another bunch of messages >> using >> the same message group. This time the messages were distributed across >> the >> two brokers. The message group feature didn't work any more. Is this a >> bug? >> >> I'm running with embedded AMQ brokers in JBoss 4.0.5, using the >> activemq-rar. >> >> Thanks, >> Pete >> -- >> View this message in context: >> http://www.nabble.com/Message-groups%2C-failover%2C-recovery-problem-tf3620418s2354.html#a10109570 >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > James > ------- > http://macstrac.blogspot.com/ > > -- View this message in context: http://www.nabble.com/Message-groups%2C-failover%2C-recovery-problem-tf3620418s2354.html#a10162127 Sent from the ActiveMQ - User mailing list archive at Nabble.com.