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
相关推荐
Glink3 小时前
现在开始将Github作为数据库
前端·算法·github
jio本小子3 小时前
GitHub 上常用的英语词汇及其中文翻译
github
逛逛GitHub4 小时前
发现 4 个 GitHub 开源项目,太给劲儿了。
github
uhakadotcom5 小时前
ChatGPT Atlas的使用笔记
后端·面试·github
aicoding_sh5 小时前
为 Claude Code CLI 提供美观且高度可定制的状态行,具有powerline support, themes, and more.
后端·github
云心雨禅6 小时前
DNS工作原理:从域名到IP
运维·前端·网络协议·tcp/ip·github
脚踏实地的大梦想家7 小时前
【Go】P11 掌握 Go 语言函数(二):进阶玩转高阶函数、闭包与 Defer/Panic/Recover
开发语言·后端·golang
讽刺人生7468 小时前
RFSOC学习记录(二)IP核的整体时钟结构
github
讽刺人生7468 小时前
RFSOC学习记录(一)RF data converter总览
github
CoLiuRs8 小时前
在 go-zero 中优雅使用 Google Wire 实现依赖注入
后端·微服务·golang