您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

IEventProcessor IEventProcessor IEventProcessor IEventProcessor IEventProcessor IEventProcessor Interface

Definition

Provides methods for event processors. Applications must implement this interface, which enables the handling of events from Event Hubs. This interface is the main extensibility point for the EventProcessorHost and RegisterProcessor<T>(Lease, ICheckpointManager).

public interface class IEventProcessor
public interface class IEventProcessor
__interface IEventProcessor
public interface IEventProcessor
type IEventProcessor = interface
Public Interface IEventProcessor

Methods

CloseAsync(PartitionContext, CloseReason) CloseAsync(PartitionContext, CloseReason) CloseAsync(PartitionContext, CloseReason) CloseAsync(PartitionContext, CloseReason) CloseAsync(PartitionContext, CloseReason) CloseAsync(PartitionContext, CloseReason)

Called when the ownership of partition moves to a different node for load-balancing purpose, or when the host is shutting down. Called in response to UnregisterProcessorAsync(Lease, CloseReason).

OpenAsync(PartitionContext) OpenAsync(PartitionContext) OpenAsync(PartitionContext) OpenAsync(PartitionContext) OpenAsync(PartitionContext) OpenAsync(PartitionContext)

Initializes the Event Hub processor instance. This method is called before any event data is passed to this processor instance.

ProcessEventsAsync(PartitionContext, IEnumerable<EventData>) ProcessEventsAsync(PartitionContext, IEnumerable<EventData>) ProcessEventsAsync(PartitionContext, IEnumerable<EventData>) ProcessEventsAsync(PartitionContext, IEnumerable<EventData>) ProcessEventsAsync(PartitionContext, IEnumerable<EventData>) ProcessEventsAsync(PartitionContext, IEnumerable<EventData>)

Asynchronously processes the specified context and messages. This method is called when there are new messages in the Event Hubs stream. Make sure to checkpoint only when you are finished processing all the events in each batch.

Applies to