Der Cruise-Control-Reporter berichtet über die BROKER-Adresse
[demos/kafka/training] / docker / docker-compose.yml
index bd6fa06..7294d59 100644 (file)
@@ -35,6 +35,7 @@ services:
         org.apache.kafka.common.security.plain.PlainLoginModule required \
         user_schemaregistry="schemaregistry-secret" \
         user_connect="connect-secret" \
+        user_ui="ui-secret" \
         user_client="client-secret";
       KAFKA_LISTENER_NAME_LOCALHOST_SASL_ENABLED_MECHANISMS: PLAIN
       KAFKA_LISTENER_NAME_LOCALHOST_PLAIN_SASL_JAAS_CONFIG: |
@@ -77,6 +78,7 @@ services:
         org.apache.kafka.common.security.plain.PlainLoginModule required \
         user_schemaregistry="schemaregistry-secret" \
         user_connect="connect-secret" \
+        user_ui="ui-secret" \
         user_client="client-secret";
       KAFKA_LISTENER_NAME_LOCALHOST_SASL_ENABLED_MECHANISMS: PLAIN
       KAFKA_LISTENER_NAME_LOCALHOST_PLAIN_SASL_JAAS_CONFIG: |
@@ -124,6 +126,7 @@ services:
         org.apache.kafka.common.security.plain.PlainLoginModule required \
         user_schemaregistry="schemaregistry-secret" \
         user_connect="connect-secret" \
+        user_ui="ui-secret" \
         user_client="client-secret";
       KAFKA_LISTENER_NAME_LOCALHOST_SASL_ENABLED_MECHANISMS: PLAIN
       KAFKA_LISTENER_NAME_LOCALHOST_PLAIN_SASL_JAAS_CONFIG: |
@@ -166,6 +169,7 @@ services:
         org.apache.kafka.common.security.plain.PlainLoginModule required \
         user_schemaregistry="schemaregistry-secret" \
         user_connect="connect-secret" \
+        user_ui="ui-secret" \
         user_client="client-secret";
       KAFKA_LISTENER_NAME_LOCALHOST_SASL_ENABLED_MECHANISMS: PLAIN
       KAFKA_LISTENER_NAME_LOCALHOST_PLAIN_SASL_JAAS_CONFIG: |
@@ -338,7 +342,10 @@ services:
           connections:
             docker-kafka-server:
               properties:
-                bootstrap.servers: "kafka:9091"
+                bootstrap.servers: "kafka:9092"
+                security.protocol: SASL_PLAINTEXT
+                sasl.mechanism: PLAIN
+                sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="ui" password="ui-secret";
               schema-registry:
                 url: "http://schema-registry:8085"
               connect:
@@ -350,26 +357,47 @@ services:
       - kafka-3
 
   producer:
-    image: juplo/simple-producer:1.0-SNAPSHOT
-    command: kafka:9092 test producer
+    image: juplo/endless-stream-spring-producer:1.0-SNAPSHOT
+    environment:
+      producer.throttle-ms: 1
+      spring.kafka.bootstrap-servers: kafka-1:9092, kafka-2:9092, kafka-3:9092
+      spring.kafka.client-id: producer
+      spring.kafka.template.default-topic: test
+      spring.kafka.producer.properties.linger.ms: 100
+      spring.kafka.jaas.enabled: "true"
+      spring.kafka.properties.security.protocol: SASL_PLAINTEXT
+      spring.kafka.properties.sasl.mechanism: PLAIN
+      spring.kafka.properties.sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="client" password="client-secret";
 
   consumer-1:
     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
+      spring.kafka.jaas.enabled: "true"
+      spring.kafka.properties.security.protocol: SASL_PLAINTEXT
+      spring.kafka.properties.sasl.mechanism: PLAIN
+      spring.kafka.properties.sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="client" password="client-secret";
 
   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
+      spring.kafka.jaas.enabled: "true"
+      spring.kafka.properties.security.protocol: SASL_PLAINTEXT
+      spring.kafka.properties.sasl.mechanism: PLAIN
+      spring.kafka.properties.sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="client" password="client-secret";
 
   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
+      spring.kafka.jaas.enabled: "true"
+      spring.kafka.properties.security.protocol: SASL_PLAINTEXT
+      spring.kafka.properties.sasl.mechanism: PLAIN
+      spring.kafka.properties.sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="client" password="client-secret";
 
 volumes:
   zookeeper-data: