fi
docker-compose up setup
-docker-compose up -d producer
-docker-compose ps
-
-docker-compose up -d consumer
-sleep 5
-docker-compose stop consumer
-
-docker-compose start consumer
+docker-compose up -d producer consumer
sleep 5
-
-docker-compose stop producer consumer
docker-compose logs consumer
- kafka-3
producer:
- image: juplo/simple-producer:1.0-SNAPSHOT
- command: kafka:9092 test producer
+ image: juplo/supersimple-producer:1.0-SNAPSHOT
+ environment:
+ spring.kafka.bootstrap-servers: kafka:9092
+ spring.kafka.client-id: producer
consumer:
image: juplo/spring-consumer-kafkalistener:1.0-SNAPSHOT
environment:
spring.kafka.bootstrap-servers: kafka:9092
spring.kafka.client-id: consumer
+ spring.kafka.consumer.auto-offset-reset: earliest
+ logging.level.org.apache.kafka.clients.consumer: INFO