MessagePropertyFilter.ResponseQueue Property

Definition

Gets or sets a value that indicates whether to retrieve ResponseQueue property information when receiving or peeking a message.

public:
 property bool ResponseQueue { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgResponseQueue")]
public bool ResponseQueue { get; set; }
[<System.Messaging.MessagingDescription("MsgResponseQueue")>]
member this.ResponseQueue : bool with get, set
Public Property ResponseQueue As Boolean

Property Value

true to receive ResponseQueue information; otherwise, false. The default is true.

Attributes

Examples

The following code example demonstrates the use of the ResponseQueue property.

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's ResponseQueue property.
queue->MessageReadPropertyFilter->ResponseQueue = true;

// Peek at the message. Time out after ten seconds 
// in case the message was not delivered.
orderMessage = queue->Peek(TimeSpan::FromSeconds(10.0));

// Display the value of the message's 
// Responsequeue->QueueName property.
if (orderMessage->ResponseQueue != nullptr)
{
    Console::WriteLine(
        "Message.Responsequeue->QueueName: {0}", 
        orderMessage->ResponseQueue->QueueName);
}
// Set the queue's MessageReadPropertyFilter property to enable the
// message's ResponseQueue property.
queue.MessageReadPropertyFilter.ResponseQueue = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0));

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

Remarks

The ResponseQueue property of the Message class identifies the queue that receives application-generated response messages that are sent back to the sending application by the receiving application. Response queues are specified by the sending application 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 what is in the messages as well as what is to be done when a message is received.

Applies to

See also