Comparing version 0.1.1 to 0.1.2
@@ -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).... |
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
144832
193