다음을 통해 공유


EventGridClient.ReceiveCloudEventsAsync Method

Definition

Overloads

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

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

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

Receive Batch of Cloud Events from the Event Subscription.

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

Source:
EventGridClient.cs

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

public virtual System.Threading.Tasks.Task<Azure.Response> ReceiveCloudEventsAsync (string topicName, string eventSubscriptionName, int? maxEvents, TimeSpan? maxWaitTime, Azure.RequestContext context);
abstract member ReceiveCloudEventsAsync : string * string * Nullable<int> * Nullable<TimeSpan> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.ReceiveCloudEventsAsync : string * string * Nullable<int> * Nullable<TimeSpan> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function ReceiveCloudEventsAsync (topicName As String, eventSubscriptionName As String, maxEvents As Nullable(Of Integer), maxWaitTime As Nullable(Of TimeSpan), context As RequestContext) As Task(Of 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

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

Source:
EventGridClient.cs

Receive Batch of Cloud Events from the Event Subscription.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.EventGrid.Namespaces.ReceiveResult>> ReceiveCloudEventsAsync (string topicName, string eventSubscriptionName, int? maxEvents = default, TimeSpan? maxWaitTime = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReceiveCloudEventsAsync : string * string * Nullable<int> * Nullable<TimeSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.EventGrid.Namespaces.ReceiveResult>>
override this.ReceiveCloudEventsAsync : string * string * Nullable<int> * Nullable<TimeSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.EventGrid.Namespaces.ReceiveResult>>
Public Overridable Function ReceiveCloudEventsAsync (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 Task(Of 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