Receive Method (BlockingPubSubSubscription)
- Last UpdatedApr 08, 2026
- 1 minute read
Receives the next PubSubMessage message from the underlying PubSub subscription and blocks until the data is available or the ReceiveTimeout has been reached.
public PubSubMessage Receive()
public:
PubSubMessage^ Receive();
Return Value
Returns a reference to the received PubSubMessage. If the result is not consumed immediately before the next call to Receive, then ensure that PubSubMessage.Copy has been called to preserve the underlying message data. Failure to call PubSubMessage.Copy may result in issues if concurrent message handling is required.
| Exception | Description |
|---|---|
| System.NotSupportedException | Calling Receive from an underlying callback subscription is not supported. |