Merge pull request #17728 from TylerYang/master

Add noAckBatchOptions and sslOptions to kafka-node definitions.
This commit is contained in:
Ron Buckton
2017-07-06 21:59:35 -07:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
// # Classes
export declare class Client {
constructor(connectionString: string, clientId?: string, options?: ZKOptions);
constructor(connectionString: string, clientId?: string, options?: ZKOptions, noBatchOptions?: AckBatchOptions, sslOptions?: any);
close(callback?: Function): void;
topicExists(topics: Array<string>, callback: Function): void;
refreshMetadata(topics: Array<string>, cb?: (error: any, data: any) => any): void;
+5
View File
@@ -6,6 +6,11 @@ var optionsClient = new kafka.Client('localhost:2181/', 'sendMessage', {
sessionTimeout: 30000,
spinDelay: 1000,
retries: 0
}, {
noAckBatchSize: 1000,
noAckBatchAge: 1000 * 10
}, {
rejectUnauthorized: false
});
optionsClient.close();
optionsClient.close(function(){});