JMS consumer with ActiveMQ broker network

I have a JMS theme in an ActiveMQ brokerage cluster network (aka distributed theme). I have an external JMS consumer (Weblogic portal) that needs to subscribe to this topic and receive all messages sent to it (through all brokers).

If a consumer subscribes to this topic with one of the brokers, he will receive only a subset of the messages that the broker receives, right?

I suppose that I could create a consumer for each broker and combine the messages together, but then I am also on the hook to solve connection problems and need to know which brokers are available, etc.

Question: is there a way to set up a network of brokers or consumers to receive all messages from a distributed JMS topic?

+4
source share
2 answers

If a consumer subscribes to topics on one of the brokers, this will only receive a subset of the messages that the broker receives, right?

Technically, yes, but the brokerage network is responsible for knowing which consumers are interested in messages and making sure the right brokers get the right messages.

Usually this means that each broker receives every message, but if the broker has only consumers with a given message selector, he will receive messages that are interested in these clients.

In practice, this means that you select a broker, connect to it and allow the broker network to understand itself. In theory.

+3
source

You just connect to the cluster. Deliver messages to the consumer before the cluster.

0
source

Source: https://habr.com/ru/post/1301164/


All Articles