Gets the Message Queuing-generated identifier of the message.
[Visual Basic] Overridable Public ReadOnly Property Id As String [C#] public string Id {virtual get;} [C++] public: __property virtual String* get_Id(); [JScript] public function get Id() : String;
The Message Queuing-generated unique identifier of the message.
Exception Type | Condition |
---|---|
InvalidOperationException | The Id is undefined.
-or- The message queue is filtered not to read the Id property. |
Id provides access to the Id property of the Message Queuing MSMQMessage object.
Message Queuing generates a message identifier when the message is sent. This identifier is made of 20 8-bit unsigned integers. It is composed of the machine System.GUID of the computer that sends the message and an identifier that uniquely identifies the message on the computer. By combining these two items, the message identifier is unique on the network.
Message Queuing generates message identifiers for all messages, including acknowledgment and report messages. The identifier of the original message can be found in the CorrelationId property of an acknowledgment message.
You can also use the Id when sending a response to a response queue. To provide the identifier of the original message in a response message, set the CorrelationId of the response message to the Id of the original message. The application reading the response message can then use the correlation identifier of the response message to identify the original message.
Message Class | Message Members | System.Messaging Namespace | CorrelationId | TBD