Hello.

My aim is to have a set of brokers, running in different machines, to consume messages coming from different clients, to be able to scale the system for future needs. Furthermore, HA features are also required, to protect the system on hardware malfunction.

Looking at the alternatives that ActiveMQ provides to achieve these goals, it seems to me that I could get the grid behaviour using the "Network of Brokers" feature, where all the brokers are "alive".

I understand that when more than one broker have consumers for a given queue, the messages are shared among them. But in my first tests, I've found that most of times, all the messages get consumed by one of the brokers. Could this be caused by a (default) high prefetch value?

Talking about the HA needs, I've read that a master-slave aproximation could be used, but here I won't have the grid behaviour benefits of the "Network of brokers" approach (as only one of the brokers is actually active). I would like to have a combined behaviour, where messages persist a hardware failure (better if restarting the failing node was not needed to restore them), and where messages were shared among consumers from different brokers.

I was thinking about using a "Network of Brokers" with a low prefetch value for the shared queues and disable journal files, to minimize the amount of messages "owned" by a given broker. As the database is located in a different machine, I could always restart a new broker using the schema of the failing one. Is this a right approach?

Any other idea to implement this scenario?

Best regards.



Reply via email to