What's new?
With the release of MQ 9.4.2, we are happy to introduce a new way to configure AMQP and MQTT server properties. On all platforms that support the AMQP service, IBM MQ now includes two new configuration commands: dspamqp and setamqp. Likewise, on all platforms that support the MQTT service, IBM MQ now includes two new configuration commands: dspmqxr and setmqxr.
In the recent years, several AMQP and MQTT enhancements have been brought forward which require manually editing a configuration file to set certain properties and to enable or disable features. This approach had some drawbacks. On the IBM MQ Appliance, direct access to the IBM MQ installation or data directories is not possible. Therefore, users had to stick with the default configuration, having no other way to configure their AMQP server properties. On distributed platforms, it can be somewhat cumbersome to manually locate and edit a configuration file in the file system. With the release of the new configuration commands, it is now possible to configure the AMQP and MQTT server properties files directly from the command line!
Are these commands supported on my platform?
On the IBM MQ Appliance, the dspamqp and setamqp commands are supported and will now aid users to display and configure the AMQP server properties respectively.
On distributed platforms, the dspamqp/setamqp/dspmqxr/setmqxr commands are supported and can be used to display and configure both the AMQP and MQTT server properties.
Where can these commands be found - and how do I use them?
Like several other MQ control commands, these new commands are located in the <MQ Installation Directory>\bin directory. Let's take a look at how they can be invoked.
On IBM MQ Appliance:
- You must enter the IBM MQ administration mode by entering the command mqcli on the command line.
- Enter the command you wish to execute.
For syntax and other key information on the usage of the commands, refer to the simple-to-follow instructions from IBM documentation- dspamqp and setamqp.
On Distributed systems:
- The commands are issued at the system command line.
- Your user ID must be a member of the mqm group. For more information about this, see Authority to administer IBM MQ on AIX, Linux, and Windows.
- Use the setmqenv command to automatically set up the environment for use with an installation of IBM MQ. Refer to instructions for the same here.
- Enter the command you wish to execute.
For syntax and other key information on the usage of the commands, refer to the simple-to-follow instructions from IBM documentation- dspamqp, setamqp, dspmqxr and setmqxr.
What are some scenarios where this could be useful?
Let's take a look at couple of examples that showcase the usage of the new commands:
Example 1
From IBM MQ 9.3.3, two system properties com.ibm.mq.AMQP.BATCHSZ and com.ibm.mq.AMQP.BATCHINT were introduced to fine tune the processing of AMQP message acknowledgments in batches for improved performance. Say for example that we wanted to configure the com.ibm.mq.AMQP.BATCHSZ property value to "100" and the com.ibm.mq.AMQP.BATCHINT property value to "40" for the queue manager "QM1". This can be achieved with two simple commands:
setamqp properties -m QM1 -k com.ibm.mq.AMQP.BATCHSZ -v 100
setamqp properties -m QM1 -k com.ibm.mq.AMQP.BATCHINT -v 40
Example 2
From IBM MQ 9.4.0, the AMQP and MQTT service have included support for error logging in the JSON format natively. This is an opt-in feature and needs to be enabled by setting a property. To enable JSON formatted logging for both the AMQP and the MQTT service for a sample queue manager "QM1" with the help of the new configuration commands, the following can be executed:
setamqp properties -m QM1 -k handlers -v com.ibm.mq.util.logging.MQJSONErrorLogFileHandler
setmqxr properties -m QM1 -k handlers -v com.ibm.mq.util.logging.MQJSONErrorLogFileHandler
Many other properties can be configured for both the AMQP and MQTT services. Some of these can also be found in the useful links section below.
Useful links
#Highlights-home