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

setamqp (set AMQP server properties)

Use the setamqp properties command to configure AMQP server properties.

The command allows you to individually configure the properties that are specified in the following configuration files:
  • amqptraceOn.properties
  • amqptraceOff.properties
  • amqp_java.properties
  • amqp_unix.properties
  • amqp_win.properties

Syntax

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

Required parameters

-m QMgrName
The queue manager you are setting AMQP properties for.
-k name
The name of the AMQP property that you want to set. You must combine this parameter with one of the following parameters:
-d
Delete the specified AMQP 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 setamqp properties command on all platforms, including the IBM MQ Appliance. A full list of properties that can be configured using this command can be viewed using the dspamqp (display AMQP server properties) command.

Table 1. AMQP Server Properties and values
Property Description
-Dcom.ibm.mq.AMQP.BATCHSZ Defines the maximum number of acknowledgments to be received before the AMQP service removes messages. The number can be in the range 1 through 9999. If an invalid number is set, or if the specified number is out of range, the default value of 50 is used. See Removing acknowledged AMQP messages from the queue in batches for more information.
-Dcom.ibm.mq.AMQP.BATCHINT Defines the amount of time, in milliseconds, that the AMQP service keeps acknowledged messages on the queue. The batch is cleared after this duration, even if the batch is not full. You can specify any number of milliseconds, from 1 through 999 999 999. The default value is 50. If you do not specify a value for this attribute, the default value of 50 is used. See Removing acknowledged AMQP messages from the queue in batches for more information.
-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.
-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.
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. See AMQP listener control properties.
com.ibm.mq.MQXR.MQIBindType The binding type for the service, one of: FASTPATH, SHARED, or ISOLATED. The default is FASTPATH. See AMQP listener control properties.

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 logging format for the queue manager QM1 by setting the handlers property:
    setamqp 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:
    setamqp properties -m QM1 -k handlers -r