Compartilhar via


EventGridClient.ReceiveCloudEvents Method

Definition

Overloads

ReceiveCloudEvents(String, String, Nullable<Int32>, Nullable<TimeSpan>, RequestContext)

[Protocol Method] Receive Batch of Cloud Events from the Event Subscription.

ReceiveCloudEvents(String, String, Nullable<Int32>, Nullable<TimeSpan>, CancellationToken)

Receive Batch of Cloud Events from the Event Subscription.

ReceiveCloudEvents(String, String, Nullable<Int32>, Nullable<TimeSpan>, RequestContext)

Source:
EventGridClient.cs

[Protocol Method] Receive Batch of Cloud Events from the Event Subscription.

public virtual Azure.Response ReceiveCloudEvents (string topicName, string eventSubscriptionName, int? maxEvents, TimeSpan? maxWaitTime, Azure.RequestContext context);
abstract member ReceiveCloudEvents : string * string * Nullable<int> * Nullable<TimeSpan> * Azure.RequestContext -> Azure.Response
override this.ReceiveCloudEvents : string * string * Nullable<int> * Nullable<TimeSpan> * Azure.RequestContext -> Azure.Response
Public Overridable Function ReceiveCloudEvents (topicName As String, eventSubscriptionName As String, maxEvents As Nullable(Of Integer), maxWaitTime As Nullable(Of TimeSpan), context As RequestContext) As Response

Parameters

topicName
String

Topic Name.

eventSubscriptionName
String

Event Subscription Name.

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.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

topicName or eventSubscriptionName is null.

topicName or eventSubscriptionName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

ReceiveCloudEvents(String, String, Nullable<Int32>, Nullable<TimeSpan>, CancellationToken)

Source:
EventGridClient.cs

Receive Batch of Cloud Events from the Event Subscription.

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

Parameters

topicName
String

Topic Name.

eventSubscriptionName
String

Event Subscription Name.

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

Exceptions

topicName or eventSubscriptionName is null.

topicName or eventSubscriptionName is an empty string, and was expected to be non-empty.

Applies to