Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add type definition fixes
  • Loading branch information
milindl committed May 22, 2025
commit 7144b765d3e5c673eac4f577fb2a7cafc2ee3ffc
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ v1.3.1 is a maintenance release. It is supported for all usage.

## Fixes

1. Avoid a race condition that causes 100% usage of a CPU core when
1. Avoid a race condition that causes 100% usage of a CPU core when
consuming with `partitionsConsumedConcurrently > 1` and all messages
are consumed (#300)
2. Fix type definition for `Kafka()` constructor and for passing topic configurations
to the `producer()` and `consumer()` in the promisified API (@davidkhala, #297, #).


# confluent-kafka-javascript v1.3.0
Expand Down
15 changes: 12 additions & 3 deletions types/kafkajs.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { ConsumerGlobalConfig, GlobalConfig, ProducerGlobalConfig } from './config'
import {
ConsumerGlobalConfig,
ConsumerTopicConfig,
GlobalConfig,
ProducerGlobalConfig,
ProducerTopicConfig } from './config'
import {
ConsumerGroupStates,
GroupOverview,
Expand Down Expand Up @@ -131,7 +136,9 @@ export interface ProducerConfig {
logger?: Logger,
}

export interface ProducerConstructorConfig extends ProducerGlobalConfig {
type ProducerGlobalAndTopicConfig = ProducerGlobalConfig & ProducerTopicConfig;

export interface ProducerConstructorConfig extends ProducerGlobalAndTopicConfig {
kafkaJS?: ProducerConfig;
}

Expand Down Expand Up @@ -235,7 +242,9 @@ export interface ConsumerConfig {
partitionAssignors?: PartitionAssignors[],
}

export interface ConsumerConstructorConfig extends ConsumerGlobalConfig {
export type ConsumerGlobalAndTopicConfig = ConsumerGlobalConfig & ConsumerTopicConfig;

export interface ConsumerConstructorConfig extends ConsumerGlobalAndTopicConfig {
kafkaJS?: ConsumerConfig;
}

Expand Down