golang 调用 github.com/Shopify/sarama 库坑记录

问题描述

  • 当 golang 使用 github.com/Shopify/sarama 调用 kafka 时会遇到下面两个问题
  • go mod tidy 事后会遇到路径错误
  • 编译后连接 kafka 也会有错误信息

go mod tidy 错误信息

复制代码
go: github.com/IBM/sarama@v1.43.3 used for two different module paths (github.com/IBM/sarama and github.com/Shopify/sarama)

新版本 sarama 启动会遇到下面错误

复制代码
[2024-12-03 16:33:11.447] [INFO] [37888] [commands.go:33] >>> [falcon-kafka_consumer] msg=proc.Start, ok
[2024-12-03 16:33:11.448] [INFO] [37888] [commands.go:33] >>> [falcon-kafka_consumer] msg=send.Start, ok
[2024-12-03 16:33:11.448] [INFO] [37888] [commands.go:33] >>> [falcon-kafka_consumer] msg=start to init consumer group of low version kafka
[2024-12-03 16:33:11.448] [INFO] [37888] [commands.go:33] >>> [falcon-kafka_consumer] msg=http.startHttpServer ok, listening: 0.0.0.0:6850
[2024-12-03 16:33:12.241] [ERROR] [37888] [commands.go:33] >>> [falcon-kafka_consumer] msg=init high consumer group error: kafka: client has run out of available brokers to talk to: 6 errors occurred:
	* EOF
	* EOF
	* EOF
	* EOF
相关推荐
海绵不是宝宝8171 小时前
连接远程服务器上的 jupyter notebook,解放本地电脑
服务器·jupyter·github
黑客飓风4 小时前
当GitHub宕机时,我们如何协作?
github·notepad++
mit6.8248 小时前
[Git] 如何拉取 GitHub 仓库的特定子目录
git·github
用户466537015058 小时前
如何在 IntelliJ IDEA 中可视化压缩提交到生产分支
后端·github
用户466537015058 小时前
git代码压缩合并
后端·github
若水晴空初如梦9 小时前
QT聊天项目DAY19
github
张较瘦_12 小时前
[论文阅读] 人工智能 | 当Hugging Face遇上GitHub:预训练语言模型的跨平台同步难题与解决方案
论文阅读·人工智能·github
xy_recording12 小时前
Day08 Go语言学习
开发语言·学习·golang
吧唧霸12 小时前
golang读写锁和互斥锁的区别
开发语言·算法·golang