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
相关推荐
啵啵肠5 小时前
给 AI Agent 一把求职 CLI:推荐一个面向 BOSS 直聘工作流的开源项目 boss-agent-cli
人工智能·github
谷哥的小弟6 小时前
(最新版)Git&GitHub实操图文详解教程(03)—Git工作原理
git·github·版本控制·工作原理·git工作原理
STDD7 小时前
Teeworlds / DDNet 服务器搭建:经典 2D 竞技平台游戏
服务器·游戏·github
STDD8 小时前
Alien Swarm《异星虫群》: Reactive Drop 专用服务器搭建教程
运维·服务器·github
Wy_编程8 小时前
go中的协程Goroutine
开发语言·golang
OpenTiny社区8 小时前
2026 OpenTiny NEXT 产品调研启动!
前端·开源·github
会编程的土豆8 小时前
Go 语言中的 `new` 关键字(创建指针)
java·算法·golang
逛逛GitHub9 小时前
推荐 8 个本周 YYDS 的 GitHub 开源项目。
github
逛逛GitHub10 小时前
这个 GitHub 上 1.6 万人点赞 AI PPT 工具,生成的 PPT 能编辑。
github
喵了几个咪10 小时前
Kratos 生态双定时器中间件:高精度 hptimer 与标准 cron 选型与实践
微服务·中间件·架构·golang·kratos