8.7.3 Load balancing bootstrapped clients
JMS clients that connect to a service integration bus using a bootstrap server, which is itself running a suitable messaging engine, always connect to the messaging engine running in the bootstrap server. This is because this messaging engine is the closest suitable messaging engine to the bootstrap server.
The term suitable messaging engine describes a messaging engine that matches all of the target group and connection proximity rules described in 8.7.2, Controlling messaging engine selection.
If there are many JMS clients using the same connection factory, they all bootstrap using the same list of bootstrap servers. Because the connection factory attempts to connect to a bootstrap server in the order in which they are specified in the provider endpoints list, it is likely that all of the JMS clients will be connected to the same messaging engine in the first available bootstrap server. The JMS clients will not be load-balanced across the set of suitable messaging engines. This is shown in Figure 8-53.
Figure 8-53 Bootstrapped JMS clients connecting to a single messaging engine
A solution to this problem is to make use of a dedicated bootstrap server that is not a running a messaging engine for the target bus. This ensures that the connections established for JMS client are load-balanced across the available messaging engines for the target bus. This is shown in Figure 8-54.
We expect that a future release will support the automatic load-balancing of bootstrapped JMS clients across the set of suitable messaging engines, thus reducing the tendency for bootstrapped JMS clients to congregate at a single bootstrap server.
Figure 8-54 Load balancing of connections for bootstrapped JMS clients