CorrelationId Property (Message)
Gets or sets the message identifier used by acknowledgment, report, and response messages to reference the original message.
Syntax
'Declaration <MessagingDescriptionAttribute("Provides an application-defined identifier that the receiving application can use to sort messages.")> <DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)> <ReadOnlyAttribute(True)> Public Property CorrelationId As String
'Usage Dim instance As Message Dim value As String instance.CorrelationId = value value = instance.CorrelationId
[MessagingDescription("Provides an application-defined identifier that the receiving application can use to sort messages.")] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [ReadOnly(true)] public string CorrelationId {get; set;}
[MessagingDescription("Provides an application-defined identifier that the receiving application can use to sort messages.")] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [ReadOnly(true)] public: property String^ CorrelationId { String^ get(); void set ( String^ value); }
Property Value
The message identifier specified by the Id property of the original message. The correlation identifier is used by Message Queuing when it generates an acknowledgment or report message, and by an application when it generates a response message.Exceptions
Exception | Description |
---|---|
System.InvalidOperationException | The message queue is filtered to ignore the CorrelationId property. |
System.ArgumentException | The CorrelationId is null. |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also