Skip to content

Commit

Permalink
cooperative incremental rebalance
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Fehr committed Jul 12, 2022
1 parent 29106d5 commit 1bf8159
Show file tree
Hide file tree
Showing 14 changed files with 733 additions and 73 deletions.
72 changes: 50 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
---
zookeeper:
image: confluentinc/cp-zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka
links:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper
ports:
- "2181:2181"
networks:
- localnet
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka
ports:
- 9092:9092
- 9997:9997
networks:
- localnet
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
# KAFKA_LISTENERS: PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
kafka-ui:
container_name: kafka-ui
image: provectuslabs/kafka-ui:latest
ports:
- 8080:8080
networks:
- localnet
depends_on:
- zookeeper
- kafka
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181
networks:
localnet:
attachable: true

4 changes: 2 additions & 2 deletions e2e/both.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ describe('Consumer/Producer', function() {

setTimeout(function() {
producer.produce(topic, null, buffer, null);
}, 500)
}, 500);
consumer.setDefaultConsumeTimeout(2000);
consumer.consume(1000, function(err, messages) {
t.ifError(err);
Expand Down Expand Up @@ -261,7 +261,7 @@ describe('Consumer/Producer', function() {

setTimeout(function() {
producer.produce(topic, null, buffer, null);
}, 2000)
}, 2000);
consumer.setDefaultConsumeTimeout(3000);
consumer.consume(1000, function(err, messages) {
t.ifError(err);
Expand Down
Loading

0 comments on commit 1bf8159

Please sign in to comment.