LoadBalancingOptions interface

An options bag to configure load balancing settings.

Properties

partitionOwnershipExpirationIntervalInMs

The length of time a partition claim is valid. Default: 60000

strategy

Whether to apply a greedy or a more balanced approach when claiming partitions.

  • balanced: The EventHubConsumerClient will take a measured approach to requesting partition ownership when balancing work with other clients, slowly claiming partitions until a stabilized distribution is achieved.

  • greedy: The EventHubConsumerClient will attempt to claim ownership of its fair share of partitions aggressively when balancing work with other clients.

This option is ignored when either:

  • CheckpointStore is not provided to the EventHubConsumerClient.
  • subscribe() is called for a single partition. Default: balanced
updateIntervalInMs

The length of time between attempts to claim partitions. Default: 10000

Property Details

partitionOwnershipExpirationIntervalInMs

The length of time a partition claim is valid. Default: 60000

partitionOwnershipExpirationIntervalInMs?: number

Property Value

number

strategy

Whether to apply a greedy or a more balanced approach when claiming partitions.

  • balanced: The EventHubConsumerClient will take a measured approach to requesting partition ownership when balancing work with other clients, slowly claiming partitions until a stabilized distribution is achieved.

  • greedy: The EventHubConsumerClient will attempt to claim ownership of its fair share of partitions aggressively when balancing work with other clients.

This option is ignored when either:

  • CheckpointStore is not provided to the EventHubConsumerClient.
  • subscribe() is called for a single partition. Default: balanced
strategy?: "balanced" | "greedy"

Property Value

"balanced" | "greedy"

updateIntervalInMs

The length of time between attempts to claim partitions. Default: 10000

updateIntervalInMs?: number

Property Value

number