Skip to content

Commit

Permalink
refactor: 替换为kafka镜像为3.6.0去掉zookeeper依赖 (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: longyue0521 <[email protected]>
  • Loading branch information
longyue0521 authored Oct 29, 2023
1 parent 0500923 commit f9318b2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion e2e/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

func TestKafka(t *testing.T) {
address := []string{"127.0.0.1:9092"}
address := []string{"127.0.0.1:9094"}
suite.Run(t, NewTestSuite(KafkaCreator{address: address}))
}

Expand Down
35 changes: 15 additions & 20 deletions scripts/deploy/dev-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
version: '3'
version: "3"
services:
zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: 'bitnami/kafka:3.5.1'
ports:
- '9092:9092'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
depends_on:
- zookeeper
kafka0:
image: 'bitnami/kafka:3.6.0'
ports:
- '9092:9092'
- '9094:9094'
environment:
- KAFKA_CFG_NODE_ID=0
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka0:9094,EXTERNAL://localhost:9094
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka0:9093
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER

0 comments on commit f9318b2

Please sign in to comment.