Map6 describes the use of response, administration, and dead letter queues. To run Map6, you must have three queues: queue1, queue2, and queue3. Note that queue1 and queue2 are transactional queues; queue3 is non-transactional.

The MSMQQueue output card 1 defines placing a message on queue1 having the same content (message body) as the input file from the TextFile input card 1. The PROPID_M_CORRELATIONID message header property VT_CAB is defined as MyCID. The PROPID_M_LABEL message header property VT_LPSTR is defined as MyLabel.

The output card uses the Msmq_out_extended.mtt type tree, which adds some message header properties and message header property variant types to the Msmq_out.mtt type tree used in previous map examples.

The following table describes properties for Map6:

This is the type of acknowledgment messages that MSMQ posts in the administration queue when the message is sent:


This is the time limit, in seconds, for the message to reach the queue
This is the maximum length of time, in seconds, for a message to be received from the destination queue. This includes the time getting to the target queue and the time waiting in the queue before it is retrieved by an application.
This determines whether the message should be kept in a machine journal queue (on the originating machine), sent to a dead letter queue, or neither of the above.
This is the queue used for MSMQ-generated acknowledgment messages.
This is the queue to which application-generated response messages are returned.

PROPID_M_ACKNOWLEDGE is set to 8, representing the value MQMSG_ACKNOWLEDGMENT_ NACK_RECEIVE. This means that notification is sent only when the message does not arrive at the queue1 destination queue within the PROPID_M_TIME_TO_REACH_QUEUE-specified time of five seconds or that it arrives, but is not taken from the destination queue within the PROPID_M_TIME_TO_BE_RECEIVED-specified time of 50 seconds.

Notification messages are sent to queue3, which has been specified by PROPID_M_ADMIN_QUEUE as the administration queue. It is the user's responsibility to specify the queue to be used as the administration queue. The administration queue must be non-transactional.

The PROPID_M_JOURNAL property is set to 1-the value of the QMSG_DEADLETTER constant. This specifies that undelivered messages are to be placed on a dead-letter queue. MSMQ has the following two dead-letter queues:

  • one for transactional messages (messages that are sent to a transactional queue) with a predefined name of Xact Dead Letter, and
  • one for non-transactional messages (messages that are sent to a non-transactional queue) with a predefined name of Dead Letter.

Journal queues are used to track sent messages and to store report messages from MSMQ. Had PROPID_M_JOURNAL specified instead that the message be kept in a machine journal queue, MSMQ would have created a journal queue with the predefined name Journal in each machine added to the MSMQ enterprise and in each new queue.

The last property used in this type tree is PROPID_M_RESP_QUEUE. It is used to tell the receiving application to send a response message to the defined response queue (queue2 in this example). The response queue can be either transactional or non-transactional.

Before you run the map, you must first create queue1, queue2, and queue3. Purge these queues to ensure they are clear of any old messages. You should also purge the Xact Dead Letter queue.

Run Map6.