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
相关推荐
ZVAyIVqt0UFji4 小时前
go-zero负载均衡实现原理
运维·开发语言·后端·golang·负载均衡
loop lee4 小时前
Nginx - 负载均衡及其配置(Balance)
java·开发语言·github
唐墨1238 小时前
golang自定义MarshalJSON、UnmarshalJSON 原理和技巧
开发语言·后端·golang
老大白菜9 小时前
FastAPI vs Go 性能对比分析
开发语言·golang·fastapi
千年死缓12 小时前
golang结构体转map
开发语言·后端·golang
zyh_03052112 小时前
GO--堆(have TODO)
数据结构·算法·golang
粥里有勺糖12 小时前
视野修炼第114期 | 2024JS现状调查结果
前端·javascript·github
翔云12345614 小时前
raft: Failed to contact
golang·raft·gc
o(╥﹏╥)18 小时前
github如何给本机绑定 ssh密钥(MACOS)
运维·gitee·ssh·github
ahhhhaaaa-19 小时前
【AI图像生成网站&Golang】项目架构
开发语言·架构·golang