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
相关推荐
怕浪猫11 小时前
FDE 最大的浪费不是写出有 bug 的代码,而是漂亮地解决了一个错误的问题
面试·架构·github
黄敬峰14 小时前
Next.js 全栈实战:数据清洗、ORM 设计与 AI Prompt 工程最佳实践
面试·github
峰向AI18 小时前
AI reads books:用 AI 逐页「啃」PDF 的知识提取器,一个脚本搞定一切
github
Experience-摆渡19 小时前
GitHub 47万星免费公共API清单深度调研:收录规模、维护现状与实测
github
逛逛GitHub19 小时前
GitHub 上 2.5 万星星的开源 Skill 让 AI 画出漂亮图表。
github
Cosolar20 小时前
一文弄懂 Agent Harness 与 Agent Runtime 的区别
java·后端·github
YH552698420 小时前
如何减少大模型的token消耗?日常使用,可以通过什么方式减少大模型 token 的消耗
gpt·chatgpt·github
阿里嘎多学长20 小时前
2026-08-29 GitHub 热点项目精选
开发语言·程序员·github·代码托管
smileNicky21 小时前
GitHub Pull Request 指南:从 Fork 到 Merge 的图文实战教程
github
2601_962070231 天前
差异基因富集分析(R语言——GO&KEGG&GSEA)
开发语言·golang·r语言