runmqdnm

Start processing messages on a queue using the .NET monitor ( Windows only).

Purpose

Note: The runmqdnm command applies to IBM® MQ for Windows only.

runmqdnm can be run from the command line, or as a triggered application.

Use the runmqdnm control command to start processing messages on an application queue with a .NET monitor.

Syntax

Read syntax diagramSkip visual syntax diagram runmqdnm   -q QueueName   -a AssemblyName   -m QMgrName  -c ClassName  -u UserParameter  -s Syncpoint  -d Conversion  -n MaxThreads  -t Timeout  -b BackoutThreshold  -r QueueName  -p ContextOption

Required parameters

-q QueueName
The name of the application queue to monitor.
-a AssemblyName
The name of the .NET assembly.

Optional parameters

-m QMgrName
The name of the queue manager that hosts the application queue.

If omitted, the default queue manager is used.

-c ClassName
The name of the .NET class that implements the IMQObjectTrigger interface. This class must reside in the specified assembly.
If omitted, the specified assembly is searched to identify classes that implement the IMQObjectTrigger interface:
  • If one class is found, then ClassName takes the name of this class.
  • If no classes or multiple classes are found, then the .NET monitor is not started and a message is written to the console.
-u UserData
User-defined data. This data is passed to the Execute method when the .NET monitor calls it. User data must contain ASCII characters only, with no double quotation marks, NULLs, or carriage returns.

If omitted, null is passed to the Execute method.

-s Syncpoint
Specifies whether sync point control is required when messages are retrieved from the application queue. Possible values are:
Table 1. Syncpoint parameter values.
Value Description
YES Messages are retrieved under sync point control (MQGMO_SYNCPOINT).
NO Messages are not retrieved under sync point control (MQGMO_NO_SYNCPOINT).
PERSISTENT Persistent messages are retrieved under sync point control (MQGMO_SYNCPOINT_IF_PERSISTENT).
If omitted, the value of Syncpoint is dependent on your transactional model:
  • If distributed transaction coordination (DTC) is being used, then Syncpoint is specified as YES.
  • If distributed transaction coordination (DTC) is not being used, then Syncpoint is specified as PERSISTENT.
-d Conversion
Specifies whether data conversion is required when messages are retrieved from the application queue. Possible values are:
Table 2. Conversion parameter values.
Value Description
YES Data conversion is required (MQGMO_CONVERT).
NO Data conversion is not required (no get message option specified).
If omitted, Conversion is specified as NO.
-n MaxThreads
The maximum number of active worker threads.

If omitted, MaxThreads is specified as 20.

-t Timeout
The time, in seconds, that the .NET monitor waits for further messages to arrive on the application queue. If you specify -1, the .NET monitor waits indefinitely.

If omitted when run from the command line, the .NET monitor waits indefinitely.

If omitted when run as a triggered application, the .NET monitor waits for 10 seconds.

-b BackoutThreshold
Specifies the backout threshold for messages retrieved from the application queue. Possible values are:
Table 3. BackoutThreshold parameter values.
Value Description
-1 The backout threshold is taken from the application queue attribute, BOTHRESH.
0 The backout threshold is not set.
1 or more Explicitly sets the backout threshold.
If omitted, BackoutThreshold is specified as -1.
-r QueueName
The queue to which messages, with a backout count exceeding the backout threshold, are put.
If omitted, the value of QueueName is dependent on the value of the BOQNAME attribute from the application queue:
  • If BOQNAME is non-blank, then QueueName takes the value of BOQNAME.
  • If BOQNAME is blank, then QueueName is specified as the queue manager dead letter queue. If a dead letter queue has not been assigned to the queue manager, then backout processing is not available.
-p ContextOption
Specifies whether context information from a message that is being backed out is passed to the backed out message. Possible values are:
Table 4. ContextOption parameter values.
Value Description
NONE No context information is passed.
IDENTITY Identity context information is passed only.
ALL All context information is passed.
If omitted, ContextOption is specified as ALL.

Return codes

Return code Description
0 Successful operation
36 Invalid arguments supplied
40 Queue manager not available
49 Queue manager stopping
58 Inconsistent use of installations detected
71 Unexpected error
72 Queue manager name error
133 Unknown object name error