nakadi-ui nakadi event broker 的視覺化UI工具
阿新 • • 發佈:2018-12-15
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 的狀態