Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BasePartitioner

Abstract class for Liftbridge partitioner.

All custom implementations must implment the calculatePartition method.

Hierarchy

Index

Constructors

constructor

Properties

Protected key

key: string

Protected metadata

metadata: IMetadata

Protected subject

subject: string

Methods

Abstract calculatePartition

  • calculatePartition(): number
  • Calculate the partition for the given message.

    Returns number

    Partition to send the message to.

Protected getPartitionCount

  • getPartitionCount(): number