MsmqMessage<T>.Id Property

Definition

Gets a String that contains the message identifier for this message.

public:
 property System::String ^ Id { System::String ^ get(); };
public string Id { get; }
member this.Id : string
Public ReadOnly Property Id As String

Property Value

A String that contains the message identifier for this message.

Examples

string MessageId = message.Id;
Dim MessageId = message.Id

Remarks

This property can only be accessed after the message is sent.

Message Queuing (MSMQ) generates a message identifier for the message when it is sent. The identifier is composed of 20 bytes and includes two parts: the machine GUID of the sending computer, and a message identifier that is unique on the sending computer. The combination of these two parts forms a message identifier that is unique on the network.

Message Queuing generates message identifiers for all messages, including acknowledgment and report messages. Message Queuing sends an acknowledgment message in response to the arrival or failure of a message that is sent by an application.

Applies to