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
相关推荐
微学AI7 分钟前
把 GitHub Issue 的“第一轮脏活”交给 AI:Issue AI Agent 接入蓝耘元生代实战
人工智能·github·issue
阳墨余2 小时前
Git 同时管理 Gitee 和 GitHub 的 SSH 配置实战
git·gitee·github
小弥儿9 小时前
GitHub今日热榜 | 2026-08-16:大模型微调与编码工具扎堆
学习·开源·github
圣殿骑士-Khtangc11 小时前
Go-Mutex源码解析从自旋到饥饿模式的完整演进
golang
starp14 小时前
skill 管理,后缀为public可以被git commit
github
315356691315 小时前
DeepSeek Harness 发布后,我没急着跑 Demo,先把 `.agents/` 翻了一遍
前端·后端·github
u13013017 小时前
GitHub 热榜项目:周榜(2026-08-16)
github
暮云星影18 小时前
git版本发布
git·gitee·github·gitea
m4Rk_18 小时前
【论文阅读】Agent 记忆机制(41):Agentic Plan Caching——将历史执行轨迹转化为可复用的计划记忆
论文阅读·人工智能·学习·开源·github