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

kafka-node

Package Overview
Dependencies
Maintainers
1
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 0.1.3 to 0.1.4

5

lib/client.js

@@ -11,6 +11,7 @@ 'use strict';

var Client = function (connectionString, clientId) {
var Client = function (connectionString, clientId, zkOptions) {
if (this instanceof Client === false) return new Client(connectionString, clientId);
this.connectionString = connectionString || 'localhost:2181/kafka0.8';
this.clientId = clientId || 'kafka-node-client';
this.zkOptions = zkOptions;
this.brokers = {}

@@ -28,3 +29,3 @@ this.topicMetadata = {};

Client.prototype.connect = function () {
var zk = this.zk = new Zookeeper(this.connectionString);
var zk = this.zk = new Zookeeper(this.connectionString, this.zkOptions);
var self = this;

@@ -31,0 +32,0 @@ zk.once('init', function (broker) {

6

lib/zookeeper.js

@@ -12,6 +12,4 @@ 'use strict';

*/
var Zookeeper = function (connectionString) {
this.client = zookeeper.createClient(
connectionString || 'localhost:2181/kafka0.8'
);
var Zookeeper = function (connectionString, options) {
this.client = zookeeper.createClient(connectionString,options);

@@ -18,0 +16,0 @@ var that = this;

{
"name": "kafka-node",
"description": "node client for Apache kafka, only support kafka 0.8 and above",
"version": "0.1.3",
"version": "0.1.4",
"main": "kafka.js",

@@ -6,0 +6,0 @@ "dependencies": {

@@ -16,5 +16,6 @@ Kafka-node

## Client
### Client(connectionString, clientId)
* `connectionString`: zookeeper connection string, default `localhost:2181/kafka0.8`
### Client(connectionString, clientId, [zkOptions])
* `connectionString`: Zookeeper connection string, default `localhost:2181/kafka0.8`
* `clientId`: This is a user supplied identifier for the client application, default `kafka-node-client`
* `zkOptions`: **Object**, Zookeeper options, see [node-zookeeper-client](https://github.com/alexguan/node-zookeeper-client#client-createclientconnectionstring-options)

@@ -21,0 +22,0 @@ ## Producer

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