Publishers and Subscribers
When a number of publish or deliver operations are invoked on a BrokerClusterPublisher object, it executes them on one of the Broker client connections from its Broker cluster publisher pool. In this way, the load is distributed onto more than one Broker in the territory setup.
In the classical territory setup, a published event is propagated to other Brokers for subscribers' consumption no matter where the event was published. With this BrokerClusterPublisher feature, a event can be published to a given Broker for the consumption of subscribers on that local Broker only avoiding any event propagation to other Brokers. This introduces a new type of publish operation referred to as local publish, which is available only through BrokerClusterPublisher. This enhances the scope of load balancing as far as the event consumption is concerned. A number of local publish operations on the BrokerClusterPublisher with subscribers on each of the territory Brokers would constitute a true load balanced solution. Any change to the event type definition or client group properties is propagated to all the Brokers on the territory, ensuring the integrity of the metadata.
Even for a single subscriber/publisher publishing path in a territory, Broker has some advantages in a BrokerClusterPublisher based solution. When the Broker on which publish operation is being attempted becomes unavailable, BrokerClusterPublisher would automatically retry the operation on a different Broker from the Broker cluster publisher pool until it succeeds. After the event is published successfully, the territory nature will take care of forwarding the event to right Broker where the subscriber is connected.