1

We are using wildfly 9.0.1 and load balancer Kemp LoadMaster Version 7.2.48.1.17992.RELEASE.

We have used HornetQ in WildFly without clustering.

We are sending a message in hornet queue via an external load balancer. We have two separate hornet queues and two application server. Both applications are sending a message to HornetQ via a load balancer.

We are making a single object javax.jms.ConnectionFactory when an application starts up and object javax.jms.Session each time when sending a message in the queue.

We are facing one issue when we start the application and sending messages one by one to the HornetQ via the load balancer, at that time each message goes to the same hornet queue.

Actually, each message has to pass in different HornetQ (as per the load balancer mechanism) if we are using a load balancer.

Note: In case of any HornetQ will down then load balancer will send a message to another active HornetQ. We faced Problem only when every HornetQ is active.

Any suggestion to avoid this issue?

Justin Bertram
  • 29,372
  • 4
  • 21
  • 43
  • Why are you using a load-balancer with JMS? JMS uses stateful connections unlike HTTP. Why aren't you clustering your HornetQ brokers? HornetQ already had load-balancing mechanisms. Why do you create a `Session` *every* time you send a message? Unless you're using a connection pool this is an anti-pattern. – Justin Bertram Apr 09 '21 at 13:06
  • @JustinBertram Yes, we will use HornetQ load-balancing mechanisms But which one is more useful: client or server side load balancing? Can you give me some reference for how to implement load balancer in hornet queue via clustering? – vishal patel Jun 09 '21 at 10:08
  • Most of what you want to know is likely in the documentation. Please review it if you haven't already and then either rewrite this question with new details or delete this question and create a new one. Thanks! – Justin Bertram Jun 10 '21 at 01:28

0 Answers0