EventProcessorHost Class

Definition

Represents a host for processing Event Hubs event data.

public sealed class EventProcessorHost
type EventProcessorHost = class
Public NotInheritable Class EventProcessorHost
Inheritance
EventProcessorHost

Constructors

EventProcessorHost(String, String, String, String, ICheckpointManager, ILeaseManager)

Create a new host to process events from an Event Hub.

This overload of the constructor allows maximum flexibility. This one allows the caller to specify the name of the processor host as well. The overload also allows the caller to provide their own lease and checkpoint managers to replace the built-in ones based on Azure Storage.

EventProcessorHost(String, String, String, String, String)

Create a new host to process events from an Event Hub.

Since Event Hubs are frequently used for scale-out, high-traffic scenarios, generally there will be only one host per process, and the processes will be run on separate machines. However, it is supported to run multiple hosts on one machine, or even within one process, if throughput is not a concern.

This overload of the constructor uses the default, built-in lease and checkpoint managers. The Azure Storage account specified by the storageConnectionString parameter is used by the built-in managers to record leases and checkpoints.

EventProcessorHost(String, String, String, String, String, String, String)

Create a new host to process events from an Event Hub.

This overload of the constructor uses the default, built-in lease and checkpoint managers.

EventProcessorHost(String, Uri, String, String, ITokenProvider, CloudStorageAccount, String, String, Nullable<TimeSpan>, TransportType)

Create a new host to process events from an Event Hub with provided TokenProvider

EventProcessorHost(String, Uri, String, String, ITokenProvider, ICheckpointManager, ILeaseManager, Nullable<TimeSpan>, TransportType)

Create a new host to process events from an Event Hub with provided TokenProvider

EventProcessorHost(Uri, String, String, ITokenProvider, CloudStorageAccount, String)

Create a new host to process events from an Event Hub with provided TokenProvider

EventProcessorHost(Uri, String, String, ITokenProvider, CloudStorageAccount, String, String, Nullable<TimeSpan>, TransportType)

Create a new host to process events from an Event Hub with provided TokenProvider

Properties

ConsumerGroupName

Gets the consumer group name.

EndpointAddress

Gets the event endpoint URI.

EventHubPath

Gets the event hub path.

HostName

Returns processor host name. If the processor host name was automatically generated, this is the only way to get it.

OperationTimeout

Gets the operation timeout.

PartitionManagerOptions

Gets or sets the PartitionManagerOptions instance used by the EventProcessorHost object.

TransportType

Gets the transport type.

Methods

RegisterEventProcessorAsync<T>()

This registers IEventProcessor implementation with the host using Microsoft.Azure.EventHubs.Processor.DefaultEventProcessorFactory`1. This also starts the host and causes it to start participating in the partition distribution process.

RegisterEventProcessorAsync<T>(EventProcessorOptions)

This registers IEventProcessor implementation with the host using Microsoft.Azure.EventHubs.Processor.DefaultEventProcessorFactory`1. This also starts the host and causes it to start participating in the partition distribution process.

RegisterEventProcessorFactoryAsync(IEventProcessorFactory)

This registers IEventProcessorFactory implementation with the host which is used to create an instance of IEventProcessor when it takes ownership of a partition. This also starts the host and causes it to start participating in the partition distribution process.

RegisterEventProcessorFactoryAsync(IEventProcessorFactory, EventProcessorOptions)

This registers IEventProcessorFactory implementation with the host which is used to create an instance of IEventProcessor when it takes ownership of a partition. This also starts the host and causes it to start participating in the partition distribution process.

UnregisterEventProcessorAsync()

Stop processing events. Does not return until the shutdown is complete.

Applies to