Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions types/rdkafka.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ export class KafkaConsumer extends Client<KafkaConsumerEvents> {

assignments(): Assignment[];

/**
* Whether the current partition assignment was lost in the rebalance
* callback when partitions are revoked.
*
* Only meaningful when called from within the rebalance callback.
*/
assignmentLost(): boolean;

commit(topicPartition: TopicPartitionOffsetAndMetadata | TopicPartitionOffsetAndMetadata[]): this;
commit(): this;

Expand Down Expand Up @@ -254,6 +262,28 @@ export class KafkaConsumer extends Client<KafkaConsumerEvents> {

unassign(): this;

/**
* Incrementally add partitions to the consumer's current assignment.
* Required when using cooperative-sticky rebalancing — call from within
* the rebalance callback on `ERR__ASSIGN_PARTITIONS`.
*/
incrementalAssign(assignments: Assignment[]): this;

/**
* Incrementally remove partitions from the consumer's current assignment.
* Required when using cooperative-sticky rebalancing — call from within
* the rebalance callback on `ERR__REVOKE_PARTITIONS`.
*/
incrementalUnassign(assignments: Assignment[]): this;

/**
* Get the rebalance protocol in use by the consumer group.
*
* @returns "NONE" if not joined to a group yet, otherwise "COOPERATIVE"
* or "EAGER".
*/
rebalanceProtocol(): "NONE" | "COOPERATIVE" | "EAGER";

unsubscribe(): this;

offsetsForTimes(topicPartitions: TopicPartitionTime[], timeout: number, cb?: (err: LibrdKafkaError, offsets: TopicPartitionOffset[]) => any): void;
Expand Down