Configuring connection pooling for the messaging REST API
You can configure the maximum number of pooled connections that can be used by the messaging REST API, and the behavior of the messaging REST API when all connections are in use.
Before you begin
To complete this task, you must be a user with certain privileges so that you
can use the dspmqweb and setmqweb commands:
On z/OS®, you must have authority to
run the dspmqweb and setmqweb commands, and write access to
the mqwebuser.xml file.
On all other operating systems, you must be a privileged user.![[Linux]](../common/../configure/nglinux.gif)
If the mqweb server is part of a stand-alone IBM® MQ Web Server installation, you must have write access to the
mqwebuser.xml file in the IBM MQ Web Server
data directory.
Attention:
Before you issue either the setmqweb or dspmqweb commands on z/OS, you must set the WLP_USER_DIR environment variable so that the variable points to your mqweb server configuration.
To set the WLP_USER_DIR environment variable, issue the following
command:
export WLP_USER_DIR=WLP_user_directory where
WLP_user_directory is the name of the directory that is passed
to crtmqweb. For
example:export WLP_USER_DIR=/var/mqm/web/installation1For more information, see Create the mqweb server.
About this task
To optimize the
performance of the messaging REST API, connections to
IBM MQ queue managers are pooled. That is, instead of
each REST request creating, using, and deleting its own connection, each REST request uses a
connection from a connection pool. By default, 20 connections are available for each queue manager
pool, and you can choose from three options for handling requests when all the connections are in
use:
- The messaging REST API can create a new, nonpooled connection to use for the request. This behavior is the default behavior.
- The messaging REST API can return an error.
- The messaging REST API can wait for a pooled connection to become available. This wait is an indefinite wait.
You can change the maximum number of pooled connections and the default behavior of the messaging REST API when all connections are in use by using the setmqweb properties command.