From: Kai Moritz Date: Tue, 14 Dec 2021 17:55:02 +0000 (+0100) Subject: KRAFT-Konfiguration mit einem Controller und drei Brokern X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fkraft--blech;p=demos%2Fkafka%2Ftraining KRAFT-Konfiguration mit einem Controller und drei Brokern --- e89f9b956298c940e0fa2af3a681be97d296217f diff --git a/README.sh b/README.sh new file mode 100644 index 0000000..6910442 --- /dev/null +++ b/README.sh @@ -0,0 +1,11 @@ +bin/kafka-storage.sh format -c config/kafka-0.properties -t MY4DLe41Q_q3HEHVcMAO3A -g +bin/kafka-storage.sh format -c config/kafka-1.properties -t MY4DLe41Q_q3HEHVcMAO3A -g +bin/kafka-storage.sh format -c config/kafka-2.properties -t MY4DLe41Q_q3HEHVcMAO3A -g +bin/kafka-storage.sh format -c config/kafka-3.properties -t MY4DLe41Q_q3HEHVcMAO3A -g + +bin/kafka-server-start.sh config/kafka-0.properties +bin/kafka-server-start.sh config/kafka-1.properties +bin/kafka-server-start.sh config/kafka-2.properties +bin/kafka-server-start.sh config/kafka-3.properties + +bin/kafka-metadata-shell.sh -s /tmp/kafka-0/data/__cluster_metadata-0/00000000000000000000.log diff --git a/config/kafka-0.properties b/config/kafka-0.properties new file mode 100644 index 0000000..76d6e85 --- /dev/null +++ b/config/kafka-0.properties @@ -0,0 +1,11 @@ +broker.id=0 +listeners=CONTROLLER://:9090 +# advertised.listeners=CONTROLLER://localhost:9090 +listener.security.protocol.map=CONTROLLER:PLAINTEXT +log.dirs=/tmp/kafka-0/data +offsets.topic.replication.factor=1 +transaction.state.log.replication.factor=1 +transaction.state.log.min.isr=1 +controller.listener.names=CONTROLLER +controller.quorum.voters=0@localhost-0:9090 +process.roles=controller diff --git a/config/kafka-1.properties b/config/kafka-1.properties new file mode 100644 index 0000000..b9256e2 --- /dev/null +++ b/config/kafka-1.properties @@ -0,0 +1,12 @@ +broker.id=1 +listeners=BROKER://:9091 +advertised.listeners=BROKER://localhost:9091 +listener.security.protocol.map=BROKER:PLAINTEXT, CONTROLLER:PLAINTEXT +log.dirs=/tmp/kafka-1/data +offsets.topic.replication.factor=3 +transaction.state.log.replication.factor=3 +transaction.state.log.min.isr=2 +inter.broker.listener.name=BROKER +controller.listener.names=CONTROLLER +controller.quorum.voters=0@localhost:9090 +process.roles=broker diff --git a/config/kafka-2.properties b/config/kafka-2.properties new file mode 100644 index 0000000..f0d984a --- /dev/null +++ b/config/kafka-2.properties @@ -0,0 +1,12 @@ +broker.id=2 +listeners=BROKER://:9092 +advertised.listeners=BROKER://localhost:9092 +listener.security.protocol.map=BROKER:PLAINTEXT, CONTROLLER:PLAINTEXT +log.dirs=/tmp/kafka-2/data +offsets.topic.replication.factor=3 +transaction.state.log.replication.factor=3 +transaction.state.log.min.isr=2 +inter.broker.listener.name=BROKER +controller.listener.names=CONTROLLER +controller.quorum.voters=0@localhost:9090 +process.roles=broker diff --git a/config/kafka-3.properties b/config/kafka-3.properties new file mode 100644 index 0000000..7c8cb57 --- /dev/null +++ b/config/kafka-3.properties @@ -0,0 +1,12 @@ +broker.id=3 +listeners=BROKER://:9093 +advertised.listeners=BROKER://localhost:9093 +listener.security.protocol.map=BROKER:PLAINTEXT, CONTROLLER:PLAINTEXT +log.dirs=/tmp/kafka-3/data +offsets.topic.replication.factor=3 +transaction.state.log.replication.factor=3 +transaction.state.log.min.isr=2 +inter.broker.listener.name=BROKER +controller.listener.names=CONTROLLER +controller.quorum.voters=0@localhost:9090 +process.roles=broker