MSMQMessage.DestinationQueueInfo

 

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

The DestinationQueueInfo property of the MSMQMessage

object is set by Message Queuing when a message is sent. It specifies the destination queue of the message.

Data type:MSMQQueueInfo
Run-time access:Read-only
Property DestinationQueueInfo As MSMQQueueInfo  

An MSMQQueueInfo object that represents the destination queue for the message (in C++, a smart pointer to the IMSMQQueueInfo interface).

To retrieve the DestinationQueueInfo property of the message, set the WantDestinationQueue argument of receive or peek methods to True. These methods include MSMQQueue.Peek, MSMQQueue.PeekCurrent, and MSMQQueue.PeekNext, MSMQQueue.Receive, MSMQQueue.ReceiveCurrent. For reasons of performance, the default setting of WantDestinationQueue is False.

DestinationQueueInfo is typically used when reading messages that have been sent to a queue other than its original destination queue. For example, you may want to know the original destination queue of the messages that Message Queuing has sent to a computer journal or dead-letter queue. In normal circumstances, you do not need this property because you typically read the message from its destination queue.

This property can also be used when sending response messages to a response queue. To provide the destination queue of a message in a response message, set the MSMQMessage.ResponseQueueInfo property of the response message to the DestinationQueueInfo property of the original message. The application reading the response message can then look at the response queue information property to determine the origin of the response message.

Equivalent API Property

With API function calls, the equivalent property is PROPID_M_DEST_QUEUE.

The following example is included in Using Message Queuing.

For an example ofSee
Retrieving the destination queue of a message when returning response messagesVisual Basic Code Example: Returning Response Messages

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib

MSMQMessage
MSMQMessage.ResponseQueueInfo
MSMQQueue.Peek
MSMQQueue.PeekCurrent
MSMQQueue.PeekNext
MSMQQueue.Receive
MSMQQueue.ReceiveCurrent
MSMQQueueInfo
PROPID_M_DEST_QUEUE

Community Additions

ADD
Show: