MessageType MessageType MessageType MessageType Enum


辨認訊息的型別。Identifies the type of a message. 訊息可以是一般訊息佇列訊息、正 (抵達與讀取) 或負 (抵達與讀取) 通知訊息或報告訊息。A message can be a typical Message Queuing message, a positive (arrival and read) or negative (arrival and read) acknowledgment message, or a report message.

public enum class MessageType
public enum MessageType
type MessageType = 
Public Enum MessageType


Acknowledgment Acknowledgment Acknowledgment Acknowledgment 1

通知訊息。An acknowledgment message.

Normal Normal Normal Normal 2

一般訊息佇列訊息。A normal Message Queuing message.

Report Report Report Report 3

報告訊息。A report message.


一般 (Normal類型) 訊息是指您使用Message類別MessageQueue.Send或方法的任何多載傳送到佇列的訊息。Typical (Normal type) messages are those that you send to a queue using either the Message class or any overload of the MessageQueue.Send method.

每當傳送應用程式要求時, 訊息佇列就會產生認可訊息。Message Queuing generates acknowledgment messages whenever the sending application requests one. 如果您使用Message類別來傳送訊息, 則可以使用其AcknowledgeType屬性來指定要接收的通知類型。If you send a message using the Message class, you can use its AcknowledgeType property to specify the types of acknowledgments to receive. 例如,訊息佇列可以產生正或負訊息,以表示原始訊息已抵達或已被讀取。For example, Message Queuing can generate positive or negative messages to indicate that the original message arrived or was read. 訊息佇列會將適當的認可訊息傳回給傳送應用程式所指定的管理佇列。Message Queuing returns the appropriate acknowledgment message to the administration queue specified by the sending application. 當您使用Message來接收或查看認可訊息時, 其Acknowledgment屬性會指出訊息佇列傳送通知的原因。When you receive or peek an acknowledgment message using a Message, its Acknowledgment property indicates the reason Message Queuing sent the acknowledgment.

每當在來源佇列管理員中定義報告佇列時, 訊息佇列就會產生報告訊息。Message Queuing generates report messages whenever a report queue is defined at the source queue manager. 啟用追蹤時 (藉由設定原始Message.UseTracing訊息上的屬性), 每當原始訊息進入或離開訊息佇列伺服器時, 訊息佇列就會將報告訊息傳送至訊息佇列報告佇列。When tracing is enabled (by setting the Message.UseTracing property on the original message), Message Queuing sends a report message to the Message Queuing report queue each time the original message enters or leaves a Message Queuing server.