PROPID_M_DEADLETTER_QUEUE

 

Updated: July 19, 2016

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

(Read/write.) The PROPID_M_DEADLETTER_QUEUE property indicates the path name of an application-specific dead letter queue (DLQ).

Property ID

PROPID_M_DEADLETTER_QUEUE

Type Indicator

VT_LPWSTR

MQPROPVARIANT Field

pwszVal

The path name of an application-specific DLQ.

The PROPID_M_DEADLETTER_QUEUE property is set to the path name of an application-specific DLQ. When this property is set, and the message fails to reach the destination queue, MSMQ sends a negative acknowledgment (NACK) message to the specified DLQ rather than to the system DLQ. When you set this property, you must also enable dead letter journaling by setting PROPID_M_JOURNAL to MQMSG_DEADLETTER.

PROPID_M_DEADLETTER_QUEUE can be set to any legal path name of a local transactional queue. Legal path names are defined in Queue Path Names.

PROPID_M_DEADLETTER_QUEUE is read/write for sending applications and read-only for receiving applications.

Application-specific DLQs are supported only for transactional messages, so the destination queue must be transactional as well.

When the PROPID_M_DEADLETTER_QUEUE property is set, the following scenarios cause MQSendMessage to fail and return an error:

  • Dead letter journaling is not enabled. In this case, MQSendMessage fails with the error MQ_ERROR_INSUFFICIENT_PROPERTIES.

  • The specified DLQs path name is invalid. In this case, MQSendMessage fails with the error MQ_ERROR_PROPERTY.

  • The specified DLQ is not local. In this case, MQSendMessage fails with the error MQ_ERROR_PROPERTY.

  • The message is not sent within a transaction. In this case, MQSendMessage fails with the error MQ_ERROR_INVALID_PARAMETER.

The following scenarios cause MSMQ to deliver the NACK message to the system DLQ rather than the specified DLQ and to log an error event. These conditions are checked only when the Queue Manager (QM) is ready to deliver the NACK message to the specified DLQ:

  • The specified DLQ is full when the QM attempts to deliver the NACK message to it.

  • The sending application does not have sufficient permissions to write to the specified DLQ.

  • The specified DLQ does not exist.

  • The specified DLQ is not transactional.

  • The specified DLQ requires authentication or encryption.

Your application should still check the system DLQ occasionally even if it uses an application-specific DLQ.

System_CAPS_ICON_note.jpg Note

A message that is rejected from an application-specific DLQ is delivered to the system DLQ. A message that is rejected from the system DLQ is dropped.

The PROPID_M_DEADLETTER_QUEUE_LEN property returns the length of the DLQ name. This property is implicitly set to the length of the string specified in the PROPID_M_DEADLETTER_QUEUE property.

Windows NT/2000/XP: Requires Windows Vista or later.

Windows 95/98/Me: Not supported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

Message Properties

Community Additions

ADD
Show: