Skip to content

Commit 9a7e699

Browse files
author
Robin Fehr
committed
cooperative incremental rebalance
1 parent 29106d5 commit 9a7e699

14 files changed

+731
-73
lines changed

docker-compose.yml

+49-22
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,50 @@
11
---
2-
zookeeper:
3-
image: confluentinc/cp-zookeeper
4-
ports:
5-
- "2181:2181"
6-
environment:
7-
ZOOKEEPER_CLIENT_PORT: 2181
8-
ZOOKEEPER_TICK_TIME: 2000
9-
kafka:
10-
image: confluentinc/cp-kafka
11-
links:
12-
- zookeeper
13-
ports:
14-
- "9092:9092"
15-
environment:
16-
KAFKA_BROKER_ID: 1
17-
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
18-
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
19-
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
20-
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
21-
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
22-
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
23-
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
2+
version: '2'
3+
services:
4+
zookeeper:
5+
image: confluentinc/cp-zookeeper
6+
ports:
7+
- "2181:2181"
8+
networks:
9+
- localnet
10+
environment:
11+
ZOOKEEPER_CLIENT_PORT: 2181
12+
ZOOKEEPER_TICK_TIME: 2000
13+
kafka:
14+
image: confluentinc/cp-kafka
15+
ports:
16+
- 9092:9092
17+
- 9997:9997
18+
networks:
19+
- localnet
20+
depends_on:
21+
- zookeeper
22+
environment:
23+
KAFKA_BROKER_ID: 1
24+
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
25+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
26+
# KAFKA_LISTENERS: PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092
27+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
28+
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
29+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
30+
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
31+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
32+
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
33+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
34+
kafka-ui:
35+
container_name: kafka-ui
36+
image: provectuslabs/kafka-ui:latest
37+
ports:
38+
- 8080:8080
39+
networks:
40+
- localnet
41+
depends_on:
42+
- zookeeper
43+
- kafka
44+
environment:
45+
KAFKA_CLUSTERS_0_NAME: local
46+
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
47+
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181
48+
networks:
49+
localnet:
50+
attachable: true

e2e/both.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ describe('Consumer/Producer', function() {
228228

229229
setTimeout(function() {
230230
producer.produce(topic, null, buffer, null);
231-
}, 500)
231+
}, 500);
232232
consumer.setDefaultConsumeTimeout(2000);
233233
consumer.consume(1000, function(err, messages) {
234234
t.ifError(err);
@@ -261,7 +261,7 @@ describe('Consumer/Producer', function() {
261261

262262
setTimeout(function() {
263263
producer.produce(topic, null, buffer, null);
264-
}, 2000)
264+
}, 2000);
265265
consumer.setDefaultConsumeTimeout(3000);
266266
consumer.consume(1000, function(err, messages) {
267267
t.ifError(err);

0 commit comments

Comments
 (0)