MessagePropertyFilter.ResponseQueue Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob beim Einsehen oder beim Empfang einer Meldung die ResponseQueue-Eigenschaft abgerufen wird, oder legt diesen fest.

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

Eigenschaftswert

Boolean

true, wenn Informationen über den ResponseQueue abgerufen werden, andernfalls false. Der Standardwert ist true.

Attribute

Beispiele

Im folgenden Codebeispiel wird die Verwendung des ResponseQueue-Attributs veranschaulicht.

// 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);
}

Hinweise

Die ResponseQueue Eigenschaft der Message Klasse identifiziert die Warteschlange, die vom Anwendungs generierte Antwortnachrichten empfängt, die von der empfangenden Anwendung an die gesendete Anwendung zurückgesendet werden. Antwortwarteschlangen werden durch die sendende Anwendung angegeben, wenn die Anwendung seine Nachrichten sendet. Jede verfügbare Warteschlange kann als Antwortwarteschlange ausgewählt werden.

An die Antwortwarteschlange zurückgesendete Nachrichten sind anwendungsspezifisch. Die Anwendung muss definieren, was sich in den Nachrichten befindet, und was getan werden soll, wenn eine Nachricht empfangen wird.

Gilt für

Siehe auch