Επεξεργασία

Κοινή χρήση μέσω


MsmqMessage<T>.MessageType Property

Definition

Gets the MessageType that is associated with this message.

public:
 property Nullable<System::Messaging::MessageType> MessageType { Nullable<System::Messaging::MessageType> get(); };
public System.Messaging.MessageType? MessageType { get; }
member this.MessageType : Nullable<System.Messaging.MessageType>
Public ReadOnly Property MessageType As Nullable(Of MessageType)

Property Value

The MessageType that is associated with this message. May be null.

Examples

Console.WriteLine("The message type is {0}", message.MessageType);
Console.WriteLine("The message type is {0}", message.MessageType)

Remarks

Message Queuing (MSMQ) sets this property when it sends a message. A message can have one of the following types:

  • Normal: A message sent by an application.

  • Acknowledgment: A message that Message Queuing generates when an application sends a normal message and requests an acknowledgment. For example, Message Queuing can generate a positive or negative acknowledgment to indicate whether the original message arrived at its destination queue, or whether it was retrieved from the destination queue by the receiving application. Message Queuing returns the appropriate acknowledgment message to the administration queue specified by the sending application.

  • Report: Whenever an application sends a message, if the local Queue Manager has a report queue defined, Message Queuing generates a report message and sends it to the report queue. If tracing is enabled, Message Queuing sends a report message to the report queue each time the original message enters or leaves a Message Queuing server.

Applies to