Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EventProcessorHostOptions

Package version

Describes the optional parameters that can be provided for creating an EventProcessorHost.

interface

EventProcessorHostOptions

Hierarchy

Index

Properties

Optional checkpointManager

checkpointManager: CheckpointManager
property

{CheckpointManager} [checkpointManager] A manager to manage checkpoints. Default: AzureStorageCheckpointLeaseManager.

Optional consumerGroup

consumerGroup: undefined | string
property

{string} [consumerGroup] The name of the consumer group within the Event Hub. Default value: "$default".

Optional eventHubConnectionString

eventHubConnectionString: undefined | string
property

{string} [eventHubConnectionString] Connection string for the Event Hub to receive from. Example: "Endpoint=sb://my-servicebus-namespace.servicebus.windows.net/; SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key".

Optional eventHubPath

eventHubPath: undefined | string
property

{string} [eventHubPath] The name of the EventHub. This is optional if the EventHub connection string contains EntityPath=hub-name else an Error will be thrown.

Optional fastScanInterval

fastScanInterval: undefined | number
property

{number} [fastScanInterval] There are two possible interval times between scans for available partitions, fast and slow. The fast (short) interval in seconds is used after a scan in which lease stealing has occurred, to promote quicker rebalancing. Default: 3 seconds.

Optional initialOffset

initialOffset: EventPosition
property

{EventPosition} initialOffset This is only used when then receiver is being created for the very first time and there is no checkpoint data in the blob. For this option to be effective please make sure to provide a new hostName that was not used previously.

Optional leaseDuration

leaseDuration: undefined | number
property

{number} [leaseDuration] Duration of a lease in seconds before it expires unless renewed. Default: 30 seconds, Min Value: 15 seconds, Max value: 60 seconds.

If Leasemanager is provided when creating the EventProcessorHost then this value will be ignored.

Optional leaseManager

leaseManager: LeaseManager
property

{LeaseManager} [LeaseManager] A manager to manage leases. Default: AzureStorageCheckpointLeaseManager.

Optional leaseRenewInterval

leaseRenewInterval: undefined | number
property

{number} [leaseRenewInterval] The sleep interval in seconds between scans. Default: 10 seconds.

Allows a lease manager implementation to specify to PartitionManager how often it should scan leases and renew them. In order to redistribute leases in a timely fashion after a host ceases operating, we recommend a relatively short interval, such as ten seconds. Obviously it should be less than half of the lease length, to prevent accidental expiration.

If Leasemanager is provided when creating the EventProcessorHost then this value will be ignored.

Optional onEphError

onEphError: OnEphError
property

{OnEphError} [onEphError] Error handler that can be provided to receive notifcation for general errors.

Errors which occur while processing events from a particular EventHub partition are delivered to the onError handler provided in the start() method. This handler is called on occasions when an error occurs while managing partitions or leases for the partitions.

Optional slowScanInterval

slowScanInterval: undefined | number
property

{number} [slowScanInterval] The slow (long) interval in seconds is used after a scan in which lease stealing did not occur, to reduce unnecessary scanning when the system is in steady state. Default: 5 seconds.

Optional startupScanDelay

startupScanDelay: undefined | number
property

{number} [startupScanDelay] The delay time in seconds between the first scan for available partitions and the second. This is part of a startup optimization which allows individual hosts to become visible to other hosts, and thereby get a more accurate count of the number of hosts in the system, before they try to estimate how many partitions they should own. Default: 30 seconds.

Optional storageBlobPrefix

storageBlobPrefix: undefined | string
property

{string} [storageBlobPrefix] Prefix used when naming blobs within the storage container.

Optional storageConnectionString

storageConnectionString: undefined | string
property

{string} [storageConnectionString] Connection string to Azure Storage account used for leases and checkpointing. Example "DefaultEndpointsProtocol=https;AccountName=; AccountKey=;EndpointSuffix=core.windows.net"

Optional storageContainerName

storageContainerName: undefined | string
property

{string} [storageContainerName] Azure Storage container name for use by built-in lease and checkpoint manager.

Optional tokenProvider

tokenProvider: TokenProvider
property

{TokenProvider} [tokenProvider] An instance of the token provider interface that provides the token for authentication. Default value: SasTokenProvider.

Generated using TypeDoc