Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PartitionLoadBalancer

Package version

Implements a load balancing algorithm for determining which consumers own which partitions.

Hierarchy

  • PartitionLoadBalancer

Implemented by

Index

Methods

Methods

loadBalance

  • loadBalance(partitionOwnershipMap: Map<string, PartitionOwnership>, partitionsToAdd: string[]): string[]
  • Implements load balancing by taking into account current ownership and the new set of partitions to add.

    Parameters

    • partitionOwnershipMap: Map<string, PartitionOwnership>

      The current ownerships for partitions

    • partitionsToAdd: string[]

      New partitions to assign owners to

    Returns string[]

    Partition ids to claim

Generated using TypeDoc