Bootstrap-Server für den Cruise-Control-Reporter explizit gesetzt
[demos/kafka/training] / docker / docker-compose.yml
index 65207a2..e2e4891 100644 (file)
@@ -29,6 +29,7 @@ services:
         -Dcom.sun.management.jmxremote.port=9101
         -Dcom.sun.management.jmxremote.authenticate=false
       KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
+      KAFKA_CRUISE_CONTROL_METRICS_REPORTER_BOOTSTRAP_SERVERS: localhost:9092
     volumes:
       - ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
       - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
@@ -58,6 +59,7 @@ services:
         -Dcom.sun.management.jmxremote.port=9101
         -Dcom.sun.management.jmxremote.authenticate=false
       KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
+      KAFKA_CRUISE_CONTROL_METRICS_REPORTER_BOOTSTRAP_SERVERS: localhost:9092
     volumes:
       - ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
       - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
@@ -92,6 +94,7 @@ services:
         -Dcom.sun.management.jmxremote.port=9101
         -Dcom.sun.management.jmxremote.authenticate=false
       KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
+      KAFKA_CRUISE_CONTROL_METRICS_REPORTER_BOOTSTRAP_SERVERS: localhost:9092
     volumes:
       - ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
       - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
@@ -121,6 +124,7 @@ services:
         -Dcom.sun.management.jmxremote.port=9101
         -Dcom.sun.management.jmxremote.authenticate=false
       KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
+      KAFKA_CRUISE_CONTROL_METRICS_REPORTER_BOOTSTRAP_SERVERS: localhost:9092
     volumes:
       - ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
       - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
@@ -272,16 +276,22 @@ services:
     command: kafka:9092 test producer
 
   consumer-1:
-    image: juplo/simple-consumer:1.0-SNAPSHOT
-    command: kafka:9092 test my-group consumer
+    image: juplo/spring-consumer:1.0-SNAPSHOT
+    environment:
+      spring.kafka.bootstrap-servers: kafka-1:9092, kafka-2:9092, kafka-3:9092
+      spring.kafka.client-id: consumer-1
 
   consumer-2:
-    image: juplo/simple-consumer:1.0-SNAPSHOT
-    command: kafka:9092 test my-group consumer-2
+    image: juplo/spring-consumer:1.0-SNAPSHOT
+    environment:
+      spring.kafka.bootstrap-servers: kafka-1:9092, kafka-2:9092, kafka-3:9092
+      spring.kafka.client-id: consumer-1
 
   consumer-3:
-    image: juplo/simple-consumer:1.0-SNAPSHOT
-    command: kafka:9092 test my-group consumer-3
+    image: juplo/spring-consumer:1.0-SNAPSHOT
+    environment:
+      spring.kafka.bootstrap-servers: kafka-1:9092, kafka-2:9092, kafka-3:9092
+      spring.kafka.client-id: consumer-1
 
 volumes:
   zookeeper-data: