NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

MessageQueue.ReceiveByCorrelationId (String, TimeSpan)

Receives the message that matches the given correlation ID. This method waits until a message with a matching correlation ID is available or the given timeout expires when no more messages can be inspected.

[Visual Basic]
Overloads Overridable Public Function ReceiveByCorrelationId( _
   ByVal correlationId As String, _
   ByVal timeout As TimeSpan _
) As Message
[C#]
public virtual Message ReceiveByCorrelationId(
   string correlationId,
   TimeSpan timeout
);
[C++]
public: virtual Message* ReceiveByCorrelationId(
   String* correlationId,
   TimeSpan timeout
);
[JScript]
public function ReceiveByCorrelationId(
   correlationId : String,
   timeout : TimeSpan
) : Message;

Parameters

correlationId
The CorrelationId of the message to receive.
timeout
The time to wait until a new message is available for inspection.

Return Value

The message with the matching correlation ID.

See Also

MessageQueue Class | MessageQueue Members | System.Messaging Namespace | MessageQueue.ReceiveByCorrelationId Overload List