kafka-node
Advanced tools
Comparing version 4.0.0 to 4.0.1
# 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) |
@@ -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; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
307071
6915