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
相关推荐
tachibana27 小时前
Go语言里slice是怎么扩容的?
后端·golang·go·切片
西瓜很甜哟7 小时前
golang实现大文件分片上传
后端·golang·html
Ken_P_##7 小时前
WordAgent
github·agent
阿华田5128 小时前
Java 类加载冲突实战:解决 is not an instance of
c#·linq
u1301308 小时前
GitHub 热榜项目:日榜(2026-10-11)
人工智能·github
miofly8 小时前
GitHub 日榜趋势速报 | 2026-10-13
开源·github
高频因子挖掘机8 小时前
Python 批量获取股票行情后,如何用 Pandas 统一字段、索引和数据类型?
后端·github·api
高频因子挖掘机9 小时前
多股票 K 线如何用 Pandas 对齐?从收益率计算到横截面分析
后端·github·api
用户2022522150620 小时前
我在 DSH 做了个 AI 交付验收台:没有证据,就不算通过
github