JMS clients connecting into a cluster of messaging engines

 

+

Search Tips   |   Advanced Search

 

JMS clients outside of a cluster can connect directly into a workload-managed cluster of messaging engines, where the...

  • The cluster is a bus member
  • One messaging engine has been added for every server in the cluster

Each messaging engine has been configured to prefer a different server in the cluster. JMS clients connect to the messaging engines using the connection rules

In this scenario, there is an undesirable side effect of the rules when the servers in the cluster are used as the provider endpoints for the connection factory. Consider the following example:

A JMS client connects into a cluster of servers A, B, and C. The connection factory is configured with provider endpoints of A, B, and C. This allows the client to bootstrap to any of the three servers in the cluster. Following the connection rules, the connection factory bootstraps to the first server in the provider endpoints list, A. Server A has a local messaging engine; therefore, the messaging engine on Server A is chosen as the preferred connection point for the client.

Because the connection always tries the first entry in the provider endpoints list first, every client connecting directly into the cluster connects to the messaging engine in server A. All messages produced for a destination partitioned across the cluster are assigned to the partition of the destination associated with the messaging engine. This is obviously not very good for workload management of messages. There are two methods that can overcome this:

  • Enable a SIB service on a server outside of the cluster. Configure the provider endpoints on the connection factory to point to this SIB service. If there is no messaging engine local to this SIB service, then the client connections will be workload-managed around all of the messaging engines in the bus.

    If you only have messaging engines in the cluster, no further configuration is required. If there are other non-cluster bus members, and you only want the clients to connect directly to the messaging engines in the cluster, then configure a target group on your connection factory. See Target groups.

  • Provide different clients with differently configured connection factories, each of which has a different provider endpoint in the first position in the list.

Next