Bagikan melalui


MessagePropertyFilter.ResponseQueue Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah akan mengambil ResponseQueue informasi properti saat menerima atau mengintip pesan.

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

Nilai Properti

true untuk menerima ResponseQueue informasi; jika tidak, false. Default adalah true.

Atribut

Contoh

Contoh kode berikut menunjukkan penggunaan ResponseQueue properti .

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

Keterangan

Properti ResponseQueue kelas Message mengidentifikasi antrean yang menerima pesan respons yang dihasilkan aplikasi yang dikirim kembali ke aplikasi pengirim oleh aplikasi penerima. Antrean respons ditentukan oleh aplikasi pengirim saat aplikasi mengirim pesannya. Antrean apa pun yang tersedia dapat ditentukan sebagai antrean respons.

Pesan yang dikembalikan ke antrean respons adalah khusus aplikasi. Aplikasi harus menentukan apa yang ada dalam pesan serta apa yang harus dilakukan ketika pesan diterima.

Berlaku untuk

Lihat juga