nakadi-ui nakadi event broker 的可视化UI工具
nakadi 是一款很不错的基于fafka 开发的event broker ,我们只需要使用http 请求就可以调用kafka方便的发布订阅功能
环境准备
- docker-compose 文件
version: '3'
services:
nakadi-ui:
image: nakadi/nakadi-ui
ports:
- "3000:3000"
depends_on:
- nakadi
environment:
- NAKADI_API_URL=http://nakadi:8080
nakadi:
image: adyach/nakadi-docker:latest
ports:
- "8080:8080"
depends_on:
- postgres
- zookeeper
- kafka
environment:
- SPRING_PROFILES_ACTIVE=local
- NAKADI_OAUTH2_MODE=OFF
- NAKADI_ZOOKEEPER_BROKERS=zookeeper:2181
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/local_nakadi_db
postgres:
image: adyach/nakadi-postgres:latest
ports:
- "5432:5432"
environment:
POSTGRES_USER: nakadi
POSTGRES_PASSWORD: nakadi
POSTGRES_DB: local_nakadi_db
zookeeper:
image: wurstmeister/zookeeper:3.4.6
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka:1.1.0
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false'
KAFKA_DELETE_TOPIC_ENABLE: 'true'
KAFKA_BROKER_ID: 0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
启动&&测试
- 启动
docker-compose up -d
- UI 界面
event 创建
状态查看
说明
nakadi-ui 功能是一个很方便的工具,我们可以方便的进行nakadi 管理,同时查看event 的状态