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
相关推荐
松哥_ai自动化2 小时前
从抓包GitHub Copilot认证请求,认识OAuth 2.0技术
github·copilot
qianmoQ9 小时前
GitHub 趋势日报 (2025年07月15日)
github
handsomestWei9 小时前
GitHub Jekyll博客本地Win开发环境搭建
github·jekyll·blog博客·windows开发环境
ん贤11 小时前
如何加快golang编译速度
后端·golang·go
DogDaoDao12 小时前
GitHub开源轻量级语音模型 Vui:重塑边缘智能语音交互的未来
大模型·github·音视频·交互·vui·语音模型·智能语音
riverz122712 小时前
Go 程序无法使用 /etc/resolv.conf 的 DNS 配置排查记录
golang
一小池勺13 小时前
🚀 Git 如何让文件存在于远程仓库却不被本地追踪?
git·github
小华同学ai14 小时前
惊喜! Github 10k+ star 的国产流程图框架,LogicFlow 能解你的图编辑痛点?
前端·后端·github
mortimer14 小时前
为 Index-TTS 打造一个开箱即用的 Windows 整合包:从环境隔离到依赖难题的解决
人工智能·python·github
Cyan_RA914 小时前
写译 — 我靠!短进程优先调度算法究竟是怎么一回事?
面试·github·代码规范