Partilhar via


EventGridReceiverClient.Receive Method

Definition

Receive a batch of Cloud Events from a subscription.

public virtual Azure.Response<Azure.Messaging.EventGrid.Namespaces.ReceiveResult> Receive (int? maxEvents = default, TimeSpan? maxWaitTime = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Receive : Nullable<int> * Nullable<TimeSpan> * System.Threading.CancellationToken -> Azure.Response<Azure.Messaging.EventGrid.Namespaces.ReceiveResult>
override this.Receive : Nullable<int> * Nullable<TimeSpan> * System.Threading.CancellationToken -> Azure.Response<Azure.Messaging.EventGrid.Namespaces.ReceiveResult>
Public Overridable Function Receive (Optional maxEvents As Nullable(Of Integer) = Nothing, Optional maxWaitTime As Nullable(Of TimeSpan) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ReceiveResult)

Parameters

maxEvents
Nullable<Int32>

Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1.

maxWaitTime
Nullable<TimeSpan>

Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to