Message.Acknowledgment Message.Acknowledgment Message.Acknowledgment Message.Acknowledgment Property

定義

取得這個訊息所表示的認可分類。Gets the classification of acknowledgment that this message represents.

public:
 property System::Messaging::Acknowledgment Acknowledgment { System::Messaging::Acknowledgment get(); };
[System.Messaging.MessagingDescription("MsgAcknowledgement")]
public System.Messaging.Acknowledgment Acknowledgment { get; }
member this.Acknowledgment : System.Messaging.Acknowledgment
Public ReadOnly Property Acknowledgment As Acknowledgment

屬性值

其中一個 Acknowledgment 列舉值。One of the Acknowledgment enumeration values.

例外狀況

未傳送訊息。The message has not been sent. 這個屬性只能在從佇列擷取的訊息中讀取。This property can only be read on messages retrieved from a queue.

-或--or- 篩選訊息佇列以忽略 Acknowledgment 屬性。The message queue is filtered to ignore the Acknowledgment property.

備註

當您從管理佇列接收訊息時, 請讀取Acknowledgment屬性以驗證原始訊息的狀態。When you receive a message from an administration queue, read the Acknowledgment property to verify the status of the original message.

當訊息傳送到其目的地佇列時, 可以要求訊息佇列張貼通知訊息。When a message is sent to its destination queue, Message Queuing can be requested to post an acknowledgment message. 例如, 這類訊息可以指出訊息是否抵達, 以及是否在指定的時間內取得, 或是指出傳遞失敗的情況發生錯誤。Such a message can indicate, for example, whether the message arrived and was retrieved within specified time-outs, or it can indicate what went wrong in the case of delivery failure. 目的地佇列會傳回通知訊息, 並將其張貼至原始訊息的AdministrationQueue屬性中指定的管理佇列。The destination queue returns acknowledgment messages and posts them to the administration queue specified in the original message's AdministrationQueue property. 認可Id訊息的屬性會識別認可訊息, 而不是原始訊息。The Id property of an acknowledgment message identifies the acknowledgment message, not the original message. 您可以在認可Message實例的CorrelationId屬性中找到原始訊息的識別碼。You can find the identifier of the original message in the acknowledgment Message instance's CorrelationId property.

如果這個Message實例代表認可訊息, 則Acknowledgment屬性會指定通知的類型。If this Message instance represents an acknowledgment message, the Acknowledgment property specifies the type of acknowledgment. 否則, Acknowledgment屬性會包含值NormalOtherwise, the Acknowledgment property contains the value Normal.

使用原始AcknowledgeType訊息的屬性, 來指定將傳回通知的情況。Use the AcknowledgeType property of the original message to specify the circumstances under which acknowledgments will be returned.

適用於

另請參閱