Configuring balancing behavior using the MQI
To influence precisely when IBM® MQ re-balances applications, certain client application environments can provide information at connect time about the messaging pattern being employed.
In the MQI, the balancing options structure is known as the MQBNO.
client.ini file
deployed alongside the client application.Application version contains a Name field to identify which
application these options apply to.If either form of stanza is supplied, all fields are required
to be present except BalanceOptions which is assumed to be
none if not explicitly set.
- An MQBNO structure is supplied by the application on CONNX and used in entirety
- Or, the matching named
Applicationstanza, if present, is solely used to generate one - Or, the
ApplicationDefaultsstanza, if present, is solely used to generate one - Or, no MQBNO flows for this connection.
client.ini file:- The ApplicationType or pattern of application.
This field indicates to IBM MQ the general pattern of IBM MQ activity in which this application participates.
Three types of application are supported:- Simple
- No specific rules should be applied beyond the defaults described in Default application balancing behavior .
- Request-Reply
- After each MQPUT call, a matching MQGET call is expected for a response message. See Request-reply balancing for more details.
- Managed client
- Re-balancing requests are always dispatched immediately to the client, which re-balances at a point it considers appropriate, for example, the JEE resource adapter would register in this manner.
- The Timeout after which re-balancing can interrupt application activity
- Specific BalanceOptions
Examples of when your application might be re-balanced
- Suggested IBM MQ configuration
- Default options sufficient
- Result
- An application instance is moved after an MQCMIT call succeeds (or fails), once the configured
number of transactions has been met.
By default, if a batch of messages exceeds 10 seconds, it might be rolled back if a rebalance has been requested. If you expect transactions to regularly exceed this limit and require this to be permitted, you can extend the Timeout appropriately.
- Suggested IBM MQ configuration
- Set Type to MQBNO_BALTYPE_REQREP
- Result
- An application instance is moved when an application completes an MQGET call , at which point the application instance moves to another queue manager. Any subsequent MQPUT calls are carried out on the new queue manager.