wsb3383
wsb3383

Reputation: 3881

HornetQ clustering topologies

I understand that in HornetQ you can do live-backup pairs type of clustering. I also noticed from the documentation that you can do load balancing between two or more nodes in a cluster. Are those the only two possible topologies? How would you implement a clustered queue pattern?

Thanks!

Upvotes: 1

Views: 2214

Answers (2)

How would you implement a clustered queue pattern?

Tips for EAP 6.1/HornetQ 2.3 To implement a distributed queue/topic:

Without it, no errors are shown, the core bridge connection is established... but messages are not being distributed, again no errors or warnings at all...

  • make sure security domain and security realms, users, passwords, roles are properly set.

E.g. I confused the domain id ('other') with the realm id ('ApplicationRealm') and got auth errors, but the errors were generic, so I wasted time checking users, passwords, roles... until I eventually found out.

  • debug by enabling debug (logger.org.hornetq.level=DEBUG)

Upvotes: 0

Clebert Suconic
Clebert Suconic

Reputation: 5383

Let me answer this using two terminologies: One the core queues from hornetq:

When you create a cluster connection, you are setting an address used to load balance hornetq addresses and core-queues (including its direct translation into jms queues and jms topics), for the addresses that are part of the cluster connection basic address (usually the address is jms)

When you load balance a core-queue, it will be load balanced among different nodes. That is each node will get one message at the time.

When you have more than one queue on the same address, all the queues on the cluster will receive the messages. In case one of these queues are in more than one node.. than the previous rule on each message being load balanced will also apply.

In JMS terms:

Topic subscriptions will receive all the messages sent to the topic. Case a topic subscription name / id is present in more than one node (say same clientID and subscriptionName on different nodes), they will be load balanced.

Queues will be load balanced through all the existent queues.

Notice that there is a setting on forward when no consumers. meaning that you may not get a message if you don't have a consumer. You can use that to configure that as well.

Upvotes: 3

Related Questions