[MQ 9.4.2 Feb 2025][UNIX, Linux, Windows, IBM i]

setmqxr (set MQTT server properties)

Use the setmqxr properties command to configure MQTT server properties.

The command allows you to individually configure the properties that are specified in the following configuration files:
  • mqxrtraceOff.properties
  • mqxrtraceOn.properties
  • java.properties
  • mqxr_unix.properties
  • mqxr_win.properties

Syntax

Read syntax diagramSkip visual syntax diagram setmqxr properties  -m QMgrName  -k name -d -vvalue-r-l

Required parameters

-m QMgrName
The queue manager you are setting MQTT properties for.
-k name
The name of the MQTT property that you want to set. You must combine this parameter with one of the following parameters:
-d
Delete the specified MQTT property.
-v value
The value that the property is set to.
-r
Reset the specified property to its default value.

Optional parameters

-l
Enable verbose logging. Diagnostic information is written to a log file.

The following table lists some of the properties can be configured by the setmqxr properties command on all platforms. A full list of properties that can be configured using this command can be viewed by using the dspmqxr (display MQTT server properties) command.

Table 1. MQTT Server properties and values
Property Description
-Dcom.ibm.mq.MQXR.GenerateHeapDump Specifies whether or not a Java heap dump is generated when the service encounters a low memory exception. It accepts a value of true and false. If you do not specify a value for this attribute, the default value of false is used.
-Dcom.ibm.mq.MQXR.GenerateJavaDump Specifies whether or not a Java core dump is generated when an FDC is generated. It accepts a value of true and false. If you do not specify a value for this attribute, the default value of false is used.
-Xms<size> The -Xms option sets the initial and minimum Java heap size. The size is specified in megabytes. For example, -Xms512m. To configure this property, the -v argument must be left empty.
-Xmx<size> This option sets the maximum Java heap size. The size is specified in megabytes. For example, -Xmx1024m. To configure this property, the -v argument must be left empty.
handlers Specifies the log file handler to use. It accepts the values com.ibm.mq.util.logging.MQErrorLogFileHandler, com.ibm.mq.util.logging.MQJSONErrorLogFileHandler, java.util.logging.MemoryHandler, and com.ibm.mq.util.logging.MQCommonServicesHandler. A combination of these can also be used by specifying a comma-separated list.
com.ibm.mq.MQXR.Workers The number of server workers the service should use. If not set, the value defaults to the number of processors.
com.ibm.mq.MQXR.MQIBindType The binding type for the service, one of: FASTPATH, SHARED, or ISOLATED. The default is FASTPATH.

Return codes

Table 2. Return code identifiers and descriptions
Return code Description
0 Command successful
>0 Command not successful

Examples

  • The following command enables JSON formatted logs for MQTT for the queue manager QM1:
    setmqxr properties -m QM1 -k handlers -v com.ibm.mq.util.logging.MQJSONErrorLogFileHandler
  • The following command resets the logging format back to its default setting of plain text logs:
    setmqxr properties -m QM1 -k handlers -r