Message.Acknowledgment 属性


获取该消息表示的确认分类。Gets the classification of acknowledgment that this message represents.

 property System::Messaging::Acknowledgment Acknowledgment { System::Messaging::Acknowledgment get(); };
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.