/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
///
import { EventEmitter } from "events";
import { IConsumer, IPartitionLambdaFactory, ILogger } from "@fluidframework/server-services-core";
/**
* The PartitionManager is responsible for maintaining a list of partitions for the given Kafka topic.
* It will route incoming messages to the appropriate partition for the messages.
* @internal
*/
export declare class PartitionManager extends EventEmitter {
private readonly factory;
private readonly consumer;
private readonly logger?;
private readonly config?;
private readonly partitions;
private isRebalancing;
private stopped;
constructor(factory: IPartitionLambdaFactory, consumer: IConsumer, logger?: ILogger | undefined, config?: any, listenForConsumerErrors?: boolean);
stop(): Promise;
pause(partitionId: number, offset: number): void;
resume(partitionId: number): void;
private process;
/**
* Called when rebalancing starts
* Note: The consumer may decide to only emit "rebalanced" if it wants to skip closing existing partitions
* @param partitions - Assigned partitions before the rebalance
*/
private rebalancing;
/**
* Called when rebalanced occurs
* @param partitions - Assigned partitions after the rebalance.
* May contain partitions that have been previously assigned to this consumer
*/
private rebalanced;
private sampleMessages;
private getRandomInt;
private cooperativeRebalancingAssign;
private cooperativeRebalancingRevoke;
}
//# sourceMappingURL=partitionManager.d.ts.map