[MQ 9.3.3 Jun 2023]

Configuring the connection mode for the messaging REST API

You can configure the messaging REST API to connect to either local or remote queue managers.

Before you begin

[MQ 9.3.5 Feb 2024][Linux]Note: If the mqweb server runs in a stand-alone IBM® MQ Web Server installation, this task is not applicable. The stand-alone IBM MQ Web Server supports connections to only remote queue managers.
To complete this task, you must be a user with certain privileges so that you can use the dspmqweb and setmqweb commands:
  • [z/OS]On z/OS®, you must have authority to run the dspmqweb and setmqweb commands, and write access to the mqwebuser.xml file.
  • [UNIX, Linux, Windows, IBM i]On all other operating systems, you must be a privileged user.
[z/OS]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/installation1

For more information, see Create the mqweb server.

About this task

The default connection mode for the messaging REST API varies depending on the type of installation that runs the mqweb server:
  • In an IBM MQ installation, by default the messaging REST API connects only to local queue managers in the same installation as the mqweb server. Complete the steps in this task to view and change the connection configuration.
  • [MQ 9.3.5 Feb 2024][Linux]In a stand-alone IBM MQ Web Server installation, the messaging REST API supports connections to only remote queue managers. The connection configuration cannot be displayed or changed.

Procedure

  • View the current configuration of the messaging REST API by using the following command:
    dspmqweb properties -a
    The mqRestMessagingConnectionMode field shows the current connection mode. If the value is local, the messaging REST API can connect only to queue managers in the same installation as the mqweb server. If the value is remote, the messaging REST API can connect to remote queue managers.
  • Configure the mqweb server to allow the messaging REST API to connect only to queue managers that are in the same installation as the mqweb server by using the following commands:
    setmqweb properties -k mqRestMessagingConnectionMode -v local
    endmqweb
    strmqweb
  • Configure the mqweb server to allow the messaging REST API to connect to remote queue managers by using the following command:
    setmqweb properties -k mqRestMessagingConnectionMode -v remote
    endmqweb
    strmqweb

What to do next

If you configure the mqweb server to allow the messaging REST API to connect to remote queue managers, you must provide connection information for each queue manager that you want to connect to. For more information about how to provide the connection information, see Setting up a remote queue manager for use with the messaging REST API.