Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kafka-node

Package Overview
Dependencies
Maintainers
3
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kafka-node - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

4

CHANGELOG.md
# kafka-node CHANGELOG
## 2019-01-31, Version 4.0.1
* Fixed issue when KafkaClient.getController wasn't using cached details when controller id is 0 [#1176](https://github.com/SOHU-Co/kafka-node/pull/1176)
* Update TS typings [#1174](https://github.com/SOHU-Co/kafka-node/pull/1174) and [#1099](https://github.com/SOHU-Co/kafka-node/pull/1099)
## 2019-01-10, Version 4.0.0

@@ -4,0 +8,0 @@ * Pending timers from connect, and waitUntilReady are cleared when `KafkaClient` is closed [#1163](https://github.com/SOHU-Co/kafka-node/pull/1163)

2

lib/kafkaClient.js

@@ -258,3 +258,3 @@ 'use strict';

// Check for cached controller
if (this.clusterMetadata.controllerId) {
if (this.clusterMetadata.controllerId != null) {
var controller = this.brokerMetadata[this.clusterMetadata.controllerId];

@@ -261,0 +261,0 @@ var broker = this.getBroker(controller.host, controller.port);

@@ -17,3 +17,3 @@ {

"bugs": "https://github.com/SOHU-co/kafka-node/issues",
"version": "4.0.0",
"version": "4.0.1",
"main": "kafka.js",

@@ -20,0 +20,0 @@ "types": "types/index.d.ts",

@@ -20,2 +20,6 @@ import { Readable, Writable } from 'stream';

connect (): void;
createTopics (topics: CreateTopicRequest[], callback: (error: any, result: CreateTopicResponse[]) => any): void;
loadMetadataForTopics (topics: string[], callback: (error: any, result: MetadataResponse) => any): void;
}

@@ -175,2 +179,5 @@

clientId?: string;
idleConnection?: number;
maxAsyncRequests?: number;
sasl?: any;
}

@@ -295,1 +302,50 @@

export type CustomPartitioner = (partitions: number[], key: string | Buffer) => number;
export interface CreateTopicRequest {
topic: string;
partitions: number;
replicationFactor: number;
configEntries?: {
name: string;
value: string;
}[];
replicaAssignment?: {
partition: number;
replicas: number[];
}[];
}
export interface CreateTopicResponse {
topic: string;
error: string;
}
export interface BrokerMetadataResponse {
[id: number]: {
host: string;
nodeId: number;
port: number;
};
}
export interface ClusterMetadataResponse {
clusterMetadata: {
controllerId: number;
};
metadata: {
[topic: string]: {
[partition: number]: {
leader: number;
partition: number;
topic: string;
replicas: number[];
isr: number[];
};
};
};
}
export interface MetadataResponse extends Array<BrokerMetadataResponse|ClusterMetadataResponse> {
0: BrokerMetadataResponse;
1: ClusterMetadataResponse;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc