Home
Passing subscription information between brokers
Subscriptions flow to all nodes in the network that support the stream.
A broker consolidates all the subscriptions that are registered with it, whether from applications directly or from other brokers. In turn, it registers subscriptions for these topics with its neighbors, unless a subscription already exists.
When an application publishes information, the receiving broker forwards it. possibly through one or more other brokers, to any applications that have valid subscriptions for it, including applications registered at other brokers supporting this stream (for global publications).
Propagation of subscriptions through a broker network
Subscriber 1 registers a subscription for a particular topic and stream on the Asia broker (1). The subscription for this topic is forwarded to all other brokers in the network that support the stream (2,3,4).Subscriber 2 registers a subscription, with the same topic and stream as above, on the HQ broker (5). The subscription for this topic is forwarded to the Asia broker, so that it is aware that subscriptions exist elsewhere on the network (6). The subscription does not have to be forwarded to the Europe broker, because a subscription for this topic has already been registered.
Propagation of publications through a broker network
A publisher sends a publication, on the same topic and stream to the Europe broker (7). A subscription for this topic exists from HQ to Europe, so the publication is forwarded to the HQ broker (8). However, no subscription exists from London to Europe (only from Europe to London), so the publication is not forwarded to the London broker. The HQ broker sends the publication directly to subscriber 2 and to the Asia broker (9), from where it is forwarded to subscriber 1 (10).
When a broker sends any publish or subscribe message to another broker, it sets its own user ID in the message, and uses its own authority to put the message. This means that the broker must have the authority to put messages onto other brokers' queues (unless the channel is set up to put incoming messages with the message channel agent's authority). This also means that all authorization checks are performed at the publisher's or subscriber's local broker.
For more information about brokers, see Managing the broker.
Home