I think max-hops controls message redistribution, not load balancing. To avoid load balancing your client needs just to make a non-HA connection (for JMS you can configure the ConnectionFactory to not use ha). Setting max-hops affects all queues in the cluster. I'm not sure I understand why you don't want incoming queue message redistributed (is that what you meant by 'load balancing'?), can you describe a little more of your use case?
Max-hops is set on the cluster connection so it does indeed control the (server side) load-balancing - setting max-hops to 0 does disable load-balancing as well. I tried disabling HA on the connection factory, but to no avail (thanks for the tip though). In our case, the producer will also be using STOMP so the HA feature of the jms connection factory isn't even available (but still the problem occurrs).
The case I have is for example two nodes, each have a separate, external producer sending message to the incoming queue. Since both nodes has it's own producer, load-balancing (and yes, I do mean server side load-balacing which is what HornetQ calls it in the documentation) is redundant, the load-balancing is handled by having the separate producer for each node. When replying to the message, I have an outgoing queue which is only consumed by a single consumer on one of the nodes.
The queue/consumer/producer setup is not something I can change for now, so I'm just trying to find ways to deal with it.
OK I got it. You want different server side load balancing for each queue. I think you can take a look at the cluster-connection configuration, e.g.
Then create two cluster-connections based on the <address> scheme. for example you name your incoming queue as 'jms.queue.Incoming1" and outgoing queue as "jms.queue.Outgoing1",
you then configure a 'my-cluster1' cluster connection, setting '<address>jms.queue.Incoming<address>' and another 'my-cluster2' setting <address>jms.queue.Outgoing</address>.
You give one max-hops to 1 and the other 0.
Can you try this and tell us if it works?
Howard, that seems to have done it - thank you very much for you help!
You are welcome.