MessagePropertyFilter.AcknowledgeType 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 AcknowledgeType informasi properti saat menerima atau mengintip pesan.
public:
property bool AcknowledgeType { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgAcknowledgeType")]
public bool AcknowledgeType { get; set; }
[<System.Messaging.MessagingDescription("MsgAcknowledgeType")>]
member this.AcknowledgeType : bool with get, set
Public Property AcknowledgeType As Boolean
Nilai Properti
true
untuk menerima AcknowledgeType informasi; jika tidak, false
. Default adalah true
.
- Atribut
Contoh
Contoh kode berikut menunjukkan penggunaan AcknowledgeType properti .
// Set the queue's MessageReadPropertyFilter property
// to enable the message's AcknowledgeType property.
queue->MessageReadPropertyFilter->
AcknowledgeType = 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
// AcknowledgeType property.
Console::WriteLine("Message.AcknowledgeType: {0}",
orderMessage->AcknowledgeType);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's AcknowledgeType property.
queue.MessageReadPropertyFilter.AcknowledgeType = 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 AcknowledgeType property.
Console.WriteLine("Message.AcknowledgeType: {0}",
orderMessage.AcknowledgeType);
Keterangan
Properti AcknowledgeType kelas Message menentukan jenis pesan pengakuan yang diminta oleh aplikasi pengirim. Jenis pengakuan menentukan kapan pengakuan dikembalikan. Atur Message.AcknowledgeType properti sebelum mengirim pesan untuk meminta jenis pengakuan tertentu.
Berlaku untuk
Lihat juga
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk