MessagePropertyFilter.Recoverable Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau menetapkan nilai yang menunjukkan apakah akan mengambil Recoverable informasi properti saat menerima atau mengintip pesan.
public:
property bool Recoverable { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgRecoverable")]
public bool Recoverable { get; set; }
[<System.Messaging.MessagingDescription("MsgRecoverable")>]
member this.Recoverable : bool with get, set
Public Property Recoverable As Boolean
Nilai Properti
true
untuk menerima Recoverable informasi; jika tidak, false
. Default adalah false
.
- Atribut
Contoh
Contoh kode berikut menunjukkan penggunaan Recoverable properti .
// Set the queue's MessageReadPropertyFilter property
// to enable the message's Recoverable property.
queue->MessageReadPropertyFilter->Recoverable = 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
// Recoverable property.
Console::WriteLine("Message.Recoverable: {0}",
orderMessage->Recoverable);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's Recoverable property.
queue.MessageReadPropertyFilter.Recoverable = 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 Recoverable property.
Console.WriteLine("Message.Recoverable: {0}",
orderMessage.Recoverable);
Keterangan
Properti Recoverable kelas Message menunjukkan apakah pengiriman pesan dijamin, bahkan jika komputer mengalami crash saat pesan sedang dalam perjalanan ke antrean tujuan.
Jika pengiriman pesan dijamin, pesan disimpan secara lokal di setiap langkah hingga pesan berhasil diteruskan ke komputer berikutnya. Pengaturan Message.Recoverable ke true
pada pesan dapat memengaruhi throughput.