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

no-kafka

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-kafka - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

lib/group_consumer.js

@@ -101,3 +101,3 @@ "use strict";

if(typeof s.fn !== 'function'){
s.fn = GroupConsumer.ConsistentAssignment;
s.fn = GroupConsumer.RoundRobinAssignment;
}

@@ -104,0 +104,0 @@ if(_.isPlainObject(s.metadata)){

@@ -9,3 +9,3 @@ {

},
"version": "0.1.1",
"version": "0.1.2",
"main": "./lib/index.js",

@@ -12,0 +12,0 @@ "keywords": ["kafka"],

@@ -12,3 +12,3 @@ [![Build Status](https://travis-ci.org/oleksiyk/kafka.png)](https://travis-ci.org/oleksiyk/kafka)

* download and install Kafka
* create your test topic:
* create your test topic:
```shell

@@ -121,3 +121,3 @@ kafka-topics.sh --zookeeper 127.0.0.1:2181 --create --topic kafka-test-topic --partitions 3 --replication-factor 1

error: null },
]
]
},

@@ -140,3 +140,3 @@ ]

Specify an assignment strategy (or use no-kafka built-in consistent assignment strategy) and subscribe by specifying only topics. Elected group leader will automatically assign partitions between all group members.
Specify an assignment strategy (or use no-kafka built-in consistent assignment strategy) and subscribe by specifying only topics. Elected group leader will automatically assign partitions between all group members.

@@ -149,7 +149,3 @@ Example:

strategy: 'TestStrategy',
subscriptions: ['kafka-test-topic'],
metadata: {
id: process.argv[2] || 'consumer_1',
weight: 50
}
subscriptions: ['kafka-test-topic']
}];

@@ -176,3 +172,3 @@

Using `GroupConsumer.ConsistentAssignment` (default in no-kafka):
Using `GroupConsumer.ConsistentAssignment`:
```javascript

@@ -185,9 +181,10 @@ var strategies = {

weight: 50
}
},
fn: Kafka.GroupConsumer.ConsistentAssignment
};
// consumer.init(strategy)....
```
Note that each consumer in a group should have its own and consistent metadata.id.
Note that each consumer in a group should have its own and consistent metadata.id.
Using `GroupConsumer.RoundRobinAssignment`:
Using `GroupConsumer.RoundRobinAssignment` (default in no-kafka):
```javascript

@@ -197,3 +194,2 @@ var strategies = {

subscriptions: ['kafka-test-topic'],
fn: Kafka.GroupConsumer.RoundRobinAssignment
};

@@ -200,0 +196,0 @@ // consumer.init(strategy)....

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