Message::DestinationQueue Property

 

Gets the intended destination queue for a message.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

public:
[MessagingDescriptionAttribute("MsgDestinationQueue")]
property MessageQueue^ DestinationQueue {
	MessageQueue^ get();
}

Property Value

Type: System.Messaging::MessageQueue^

A MessageQueue that specifies the intended destination queue for the message.

Exception Condition
InvalidOperationException

The message has not been sent. This property can only be read on messages retrieved from a queue.

-or-

The message queue is filtered to ignore the DestinationQueue property.

The DestinationQueue property is most commonly used to determine the original destination of a message that arrived in a journal or dead-letter queue. Usually, you do not need to examine this property, because you typically retrieve the message from its destination queue.

The following code example displays the value of a message's DestinationQueue property.

.NET Framework
Available since 1.1
Return to top
Show: