Microsoft.Azure.EventHubs.Processor Namespace

Classes

Checkpoint

The context object used to preserve state in the stream.

EventProcessorConfigurationException

An exception which specifies that the EventProcessorHost configuration is incorrect.

EventProcessorHost

Represents a host for processing Event Hubs event data.

EventProcessorOptions

Defines the runtime options when registering an IEventProcessor interface with an EventHubConsumerGroup. This is also the mechanism for catching exceptions from an IEventProcessor instance used by an EventProcessorHost object.

EventProcessorRuntimeException

An exception thrown during event processing.

ExceptionReceivedEventArgs

Provides data for the Microsoft.Azure.EventHubs.Processor.EventProcessorOptions.NotifyOfException(System.String,System.String,System.Exception,System.String) event.

Lease

Contains partition ownership information.

LeaseLostException

Represents an exception that occurs when the service lease has been lost.

PartitionContext

Encapsulates information related to an Event Hubs partition used by IEventProcessor.

PartitionManagerOptions

Options to control various aspects of partition distribution happening within EventProcessorHost instance.

Interfaces

ICheckpointManager

If you wish to have EventProcessorHost store checkpoints somewhere other than Azure Storage, you can write your own checkpoint manager using this interface.

The Azure Storage managers use the same storage for both lease and checkpoints, so both interfaces are implemented by the same class. You are free to do the same thing if you have a unified store for both types of data.

This interface does not specify initialization methods because we have no way of knowing what information your implementation will require.

IEventProcessor

Interface that must be implemented by event processor classes.

Any given instance of an event processor class will only process events from one partition of one Event Hub. A PartitionContext is provided with each call to the event processor because some parameters could change, but it will always be the same partition.

Although EventProcessorHost is multithreaded, calls to a given instance of an event processor class are serialized, except for OnError(). OnOpen() is called first, then OnEvents() will be called zero or more times. When the event processor needs to be shut down, whether because there was a failure somewhere, or the lease for the partition has been lost, or because the entire processor host is being shut down, OnClose() is called after the last OnEvents() call returns.

OnError() could be called while OnEvents() or OnClose() is executing. No synchronization is attempted in order to avoid possibly deadlocking.

IEventProcessorFactory

Interface that must be implemented by an event processor factory class.

User-provided factories are needed if creating an event processor object requires more work than just a new with a parameterless constructor.

ILeaseManager

If you wish to have EventProcessorHost store leases somewhere other than Azure Storage, you can write your own lease manager using this interface.

The Azure Storage managers use the same storage for both lease and checkpoints, so both interfaces are implemented by the same class. You are free to do the same thing if you have a unified store for both types of data.

This interface does not specify initialization methods because we have no way of knowing what information your implementation will require.

Enums

CloseReason

Reason for closing an EventProcessorHost.