Configuring the messaging REST API
By default, the mqweb server which hosts the IBM® MQ Console and REST API has the messaging REST API enabled.
From IBM MQ 9.2.0, connections to IBM MQ from the messaging REST API are pooled, with 20 connections available for each
queue manager. When all connections are in use, the messaging REST API creates a new, non-pooled connection to use for
the request. You can change the maximum number of pooled connections, and the behavior of the
messaging REST API when all connections are in use by using
the setmqweb properties command. You can also configure whether messaging is enabled by using the setmqweb
properties command.
Before you begin
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.
MQWebUser role. The MQWebAdmin
and MQWebAdminRO roles are not applicable for the messaging REST API. The caller must also be authorized to access
queues used for messaging through OAM orRACF®.
For more information about security for the REST API,
see IBM MQ Console
and REST API security.
Attention:
Before issuing 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.
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
You can configure whether messaging is enabled by using the setmqweb properties command.
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 destroying 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 there are three options for handling requests when all the connections are in use:- The messaging REST API can create a new, non-pooled 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.