4. Broker hinzugefĆ¼gt
authorKai Moritz <kai@juplo.de>
Wed, 11 Oct 2023 16:20:07 +0000 (18:20 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 10 Nov 2023 12:39:26 +0000 (13:39 +0100)
docker/docker-compose.yml
docker/reasignment.json [new file with mode: 0644]

index 900001b..66bcd06 100644 (file)
@@ -78,6 +78,27 @@ services:
     depends_on:
       - zookeeper
 
+  kafka-4:
+    image: confluentinc/cp-kafka:7.5.1
+    environment:
+      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
+      KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9084
+      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
+      KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-4:9092, LOCALHOST://localhost:9084
+      KAFKA_BROKER_ID: 4
+      KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
+      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
+      KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
+      KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
+    volumes:
+      - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
+      - kafka-4-data:/var/lib/kafka/data
+    ports:
+      - 9084:9084
+    stop_grace_period: 120s
+    depends_on:
+      - zookeeper
+
   cruise-control:
     image: juplo/cruise-control
     environment:
@@ -247,3 +268,4 @@ volumes:
   kafka-1-data:
   kafka-2-data:
   kafka-3-data:
+  kafka-4-data:
diff --git a/docker/reasignment.json b/docker/reasignment.json
new file mode 100644 (file)
index 0000000..f4c5926
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "version": 1,
+  "partitions": [
+    {
+      "topic": "test",
+      "partition": 0,
+      "replicas": [
+        2,
+        1,
+        3
+      ],
+      "log_dirs": [
+        "any",
+        "any",
+        "any"
+      ]
+    },
+    {
+      "topic": "test",
+      "partition": 1,
+      "replicas": [
+        2,
+        1,
+        3
+      ]
+    }
+  ]
+}