Skip to content

Conversation

Perseus
Copy link

@Perseus Perseus commented May 26, 2025

No description provided.

this.producer.flush(timeout, postFlushAction);
}
catch (err) {
this.error('Producer encountered error while flusing events.', err);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the error message: flusing should be corrected to flushing.

Suggested change
this.error('Producer encountered error while flusing events.', err);
this.error('Producer encountered error while flushing events.', err);

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

createPartitions(topic, totalPartitions, timeout, actionPostPartitionCreation) {
try {
this.adminClient.createPartitions(topic, totalPartitions, timeout, actionPostPartitionCreation);
this.success(`Successfully created new topic partitons: topic=${topic}, totalParitions=${totalPartitions}`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the success message: partitons should be partitions. Also, the same typo appears in the error message below this line.

Suggested change
this.success(`Successfully created new topic partitons: topic=${topic}, totalParitions=${totalPartitions}`);
this.success(`Successfully created new topic partitions: topic=${topic}, totalPartitions=${totalPartitions}`);

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

this.success(`Successfully created new topic partitons: topic=${topic}, totalParitions=${totalPartitions}`);
}
catch (err) {
this.error(`Encountered error while creating new partitions for topic: topic=${topic}, totalPartitons=${totalPartitions}`, err);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the error message: totalPartitons should be spelled totalPartitions for consistency with the parameter name and other occurrences in the code.

Suggested change
this.error(`Encountered error while creating new partitions for topic: topic=${topic}, totalPartitons=${totalPartitions}`, err);
this.error(`Encountered error while creating new partitions for topic: topic=${topic}, totalPartitions=${totalPartitions}`, err);

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

'metadata.broker.list': 'localhost:9092',
'socket.keepalive.enable': true,
}, config, { 'client.id': clientId });
// commong topic configs defaults should go here.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a small typo in the comment on line 23 of client.ts: commong should be common. This appears in the comment about topic config defaults.

Suggested change
// commong topic configs defaults should go here.
// common topic configs defaults should go here.

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

}
/**
* Connect to kafka server as admin.
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSDoc parameter format has a syntax error in the first parameter. The backtick is only present at the beginning of topic but missing at the end. For proper formatting, please ensure both opening and closing backticks are included: `` topic` ``

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

*/
subscribe(topics: SubscribeTopicList): this;
/**
* Unsubscribe from all the subscribed topics.s
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a small typo in the comment: topics.s should be topics. This appears in the JSDoc for the unsubscribe() method.

Suggested change
* Unsubscribe from all the subscribed topics.s
* Unsubscribe from all the subscribed topics.

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

declare class KafkaAdmin extends Client {
private adminClient;
/**
* Initialzes a KafkaAdmin client with config.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a small typo in the method documentation: Initialzes should be corrected to Initializes.

Suggested change
* Initialzes a KafkaAdmin client with config.
* Initializes a KafkaAdmin client with config.

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

private adminClient;
/**
* Initialzes a KafkaAdmin client with config.
* Requires using connect() function after initalizing.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a small typo in the documentation comment: initalizing should be spelled initializing.

Suggested change
* Requires using connect() function after initalizing.
* Requires using connect() function after initializing.

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants