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
相关推荐
高志小鹏鹏1 小时前
告别“修复 bug”:让别人一眼看懂你的 Commit
git·github·代码规范
李同学Lino2 小时前
别让你的 AI 太安逸!我给代码 Agent 装上了“大厂 PUA”插件,产出直接翻倍(附保姆级教程)
github
用户7365436807432 小时前
用 n8n + GitHub API 搭建 AI 开源项目自动监控系统(Docker 部署 + 评分模型 + Lark推送)
github
逛逛GitHub3 小时前
这个 GitHub 项目很有意思啊,解了死磕30 年的前端难题。
github
m0_694845573 小时前
UVdesk部署教程:企业级帮助台系统实践
服务器·开发语言·后端·golang·github
@atweiwei3 小时前
Go语言面试篇数据结构底层原理精讲(下)
数据结构·面试·golang
程序员小崔日记4 小时前
一个命令救命:GitHub 爆火项目 thefuck,真把我笑服了
github·bash·开发者·宝藏项目
darkb1rd4 小时前
career-ops:Go 语言驱动 AI 求职系统实战指南
开源·github·好物分享
XMYX-04 小时前
03 - Go 常用类型速查表 + 实战建议(实战向)
开发语言·golang