Sdílet prostřednictvím


EventHubBufferedProducerClient.SendEventBatchSucceededAsync Event

Definition

Invoked after each batch of events has been successfully published to the Event Hub, this handler is optional and is intended to provide notifications for interested listeners. If this producer was configured with MaximumConcurrentSends or MaximumConcurrentSendsPerPartition set greater than 1, the handler will be invoked concurrently.

This handler will be awaited after publishing the batch; the publishing operation will not be considered complete until the handler call returns. It is advised that no long-running operations be performed in the handler to avoid negatively impacting throughput.

It is not recommended to invoke CloseAsync(Boolean, CancellationToken) or DisposeAsync() from this handler; doing so may result in a deadlock scenario if those calls are awaited.

public event Func<Azure.Messaging.EventHubs.Producer.SendEventBatchSucceededEventArgs,System.Threading.Tasks.Task> SendEventBatchSucceededAsync;
member this.SendEventBatchSucceededAsync : Func<Azure.Messaging.EventHubs.Producer.SendEventBatchSucceededEventArgs, System.Threading.Tasks.Task> 
Public Custom Event SendEventBatchSucceededAsync As Func(Of SendEventBatchSucceededEventArgs, Task) 

Event Type

Exceptions

If an attempt is made to remove a handler that doesn't match the current handler registered.

If an attempt is made to add a handler when one is currently registered.

Remarks

It is not necessary to explicitly unregister this handler; it will be automatically unregistered when CloseAsync(Boolean, CancellationToken) or DisposeAsync() is invoked.

Applies to