Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Message.ResponseQueue Property

Gets or sets the queue that receives application-generated response messages.

Namespace:  System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)
[MessagingDescriptionAttribute("MsgResponseQueue")]
public MessageQueue ResponseQueue { get; set; }

Property Value

Type: System.Messaging.MessageQueue
The MessageQueue to which application-generated response messages are returned. The default is null.
ExceptionCondition
InvalidOperationException

The message queue is filtered to ignore the ResponseQueue property.

The ResponseQueue property identifies the queue that receives application-generated response messages, which the receiving application returns to the sending application. The sending application specifies response queues when the application sends its messages. Any available queue can be specified as a response queue.

Messages returned to the response queue are application-specific. The application must define the contents of the messages as well as the action to take upon receipt of a message.

The following code example gets and sets the value of a message's ResponseQueue property.

// Set the message's ResponseQueue property. 
// (You must have a connection to a queue.)
orderMessage.ResponseQueue = queue;

// Display the new value of the message's ResponseQueue property.
Console.WriteLine("Message.ResponseQueue.QueueName: {0}",
    orderMessage.ResponseQueue.QueueName);

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.