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
相关推荐
Wang's Blog9 小时前
Go-Zero 项目开发47:自研微服务框架的必要性与核心结构设计
开发语言·微服务·golang
维基框架10 小时前
GitHub源码处理提速 一趟扫描反而更慢
人工智能·github
徐小夕11 小时前
开源!我用SQLite + DuckDB打造了一款可视化AI问数平台
前端·算法·github
码流怪侠14 小时前
SuperAGI 技术深度解析:开发者优先的开源自主 AI Agent 框架
github·agent
名字还没想好☜15 小时前
Go 用 bufio.Scanner 读大文件踩坑:默认 64KB 行上限、Buffer 扩容与按 Token 切分
开发语言·后端·golang·go
dong_junshuai15 小时前
每天一个开源项目#19 多源数据自动报告生成框架
github
vance0415 小时前
免费Cloudflare隧道隐藏公网IP
linux·tcp/ip·github
techdashen16 小时前
Go设计取舍之六: sync.Mutex正常模式与饥饿模式
开发语言·后端·golang
dong_junshuai18 小时前
每天一个开源项目#56 reverse-skill:11K Stars 的安全 Agent 路由器
github
逛逛GitHub19 小时前
3 个最近在 GitHub 上非常火的项目,最后一个有创意。
github