kafaka基础概念扫盲
# 部署:https://itcn.blog/p/0202422411.html
docker run -d -p 2181:2181 --name zookeeper1 zookeeper
docker run -d --name kafka1 -p 9092:9092 -e KAFKA_BROKER_ID=0 -e KAFKA_ZOOKEEPER_CONNECT=172.17.0.7:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092 -e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 wurstmeister/kafka
kafka-topics.sh --create --zookeeper 172.17.0.7:2181 --replication-factor 1 --partitions 1 --topic test
1
2
3
4
5
2
3
4
5
# sink
# sink插件
https://github.com/confluentinc/confluent-kafka-go/
https://docs.confluent.io/kafka-clients/go/current/overview.html#synchronous-writes
# 操作kafka
https://github.com/segmentio/kafka-go
1
2
3
4
5
2
3
4
5
上次更新: 2023-06-27 16:49:11