add kafka in docker-compose.yml

master
3y 3 years ago
parent fd4b15af5b
commit a20aa89acb

@ -15,10 +15,10 @@ austin.redis.port=6379
austin.redis.password=austin
# TODO choose : kafka/eventBus/rocketMq/rabbitMq, default eventBus
austin.mq.pipeline=eventBus
austin.mq.pipeline=kafka
# todo [kafka] ip/port【optional】, if austin.mq.pipeline=kafka 【must】
austin.kafka.ip=austin.kafka
austin.kafka.ip=austin-kafka
austin.kafka.port=9092
# todo [rocketMq] 【optional】, if austin.mq.pipeline=rocketMq【must】

@ -22,8 +22,8 @@ spring.kafka.consumer.enable-auto-commit=true
###
austin.business.topic.name=austinBusiness
austin.business.recall.topic.name=austinRecall
austin.business.recall.group.name=recallGroupId
austin.business.log.topic.name=austinTraceLog
austin.business.recall.group.name=recallGroupId
### TODO kafka tag filter,if you need, replace tagIdValue ,eg:com.java3y.austin.yyy
austin.business.tagId.key=kafka_tag_id
austin.business.tagId.value=com.java3y.austin.3y

@ -29,6 +29,33 @@ services:
/bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
networks:
- app
austin-kafka:
image: wurstmeister/kafka
container_name: kafka
volumes:
- "/etc/localtime:/etc/localtime"
environment:
KAFKA_BROKER_ID: 0
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "austinBusiness:1:1,austinRecall:1:1,austinTraceLog:1:1"
KAFKA_HEAP_OPTS: -Xmx256M -Xms256M
ports:
- "9092:9092"
depends_on:
- austin-zookepper
networks:
- app
austin-zookepper:
image: wurstmeister/zookeeper
container_name: austin-zookepper
volumes:
- "/etc/localtime:/etc/localtime"
ports:
- "2181:2181"
networks:
- app
austin:
build:
context: ./
@ -39,6 +66,7 @@ services:
depends_on:
- austin-redis
- austin-mysql
- austin-kafka
networks:
- app
networks:

Loading…
Cancel
Save