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
相关推荐
PaQiuQiu13 小时前
GitHub 开源分享 | Coding Interview University
面试·开源·github
毛毛蹭蹭14 小时前
github copilot 0.33模型使用问题
github
介一安全14 小时前
国内 GitHub 仓库下载提速
gitee·github
CoderJia程序员甲14 小时前
GitHub 热榜项目 - 日榜(2026-01-17)
ai·开源·大模型·github·ai教程
CryptoRzz16 小时前
印度股票数据API对接实战(实时行情与IPO功能全解析)
websocket·区块链·github·共识算法·分布式账本
源代码•宸16 小时前
Golang原理剖析(channel面试与分析)
开发语言·经验分享·后端·面试·golang·select·channel
moxiaoran575319 小时前
Go语言中的泛型
golang
加油201919 小时前
GO语言内存逃逸和GC机制
golang·内存管理·gc·内存逃逸
源代码•宸19 小时前
Golang原理剖析(channel源码分析)
开发语言·后端·golang·select·channel·hchan·sudog
liuyunshengsir19 小时前
golang Gin 框架下的大数据量 CSV 流式下载
开发语言·golang·gin