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
相关推荐
小帅不太帅12 分钟前
一年一次黑五,为了买软件真省钱,我做了个开源小站
前端·人工智能·github
用户69371750013842 小时前
AI 帮我写了大半年的代码,我却越来越不会写代码了
前端·后端·github
长不大的杨瑞杰6 小时前
GitHub Copilot Browser Use 实战:让 AI 在浏览器里调试与自动化测试
人工智能·github·copilot·playwright·github copilot·browser use
大侠Luffy7 小时前
用 EmbeddingGemma 2 做一个本地照片与短视频搜索工具
开源·github·ai编程
咖啡色格调7 小时前
项目已托管在 Gitee,如何同时推送到 GitHub
gitee·github
人人都是软件工程师7 小时前
前端接了 Agent,为什么还是满屏自定义代码?读懂 AG-UI 的 31 个事件
人工智能·github
怕浪猫8 小时前
GLM-5.4 深度拆解:750B 参数如何「循环」出 2-3T 级智能?
算法·面试·github
李永奉9 小时前
Git和GitHub-Git 管理的版本数据到底保存在哪个文件夹里?
git·github
利威尔xu9 小时前
Go sync.Map底层3层缓存:并发写map直接崩溃,读多写少无锁读拖垮选错锁
golang
wflynn1 天前
GitHub 今日推荐|univer:可嵌入 Web 应用的开源 Office 引擎
typescript·开源·github·doc·collaboration·board