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
相关推荐
hongtianzai3 小时前
Laravel7.x十大核心特性解析
java·c语言·开发语言·golang·php
汪海游龙4 小时前
03.23 AI 精选:面向多款 AI 编码工具的 Agent 优化框架
github
feasibility.4 小时前
Agent-Reach赋能OpenClaw成为信息管家:实现GitHub/X/b站/小红书等十大平台信息获取(含手动安装)
人工智能·github·微信公众平台·新浪微博·小红书·openclaw·agent-reach
longxibo4 小时前
【Ubuntu datasophon1.2.1 二开之八:验证实时数据入湖】
大数据·linux·clickhouse·ubuntu·linq
Java面试题总结4 小时前
go从零单排之方法
开发语言·后端·golang
lars_lhuan5 小时前
Go atomic
开发语言·后端·golang
2401_891655815 小时前
GitHub镜像站搭建全攻略技术文章大纲
python·github
hongtianzai5 小时前
Laravel8.x核心特性全解析
java·c语言·开发语言·golang·php
草梅友仁5 小时前
墨梅博客 1.10.0 发布与 AI 编程工作流优化 | 2026 年第 12 周草梅周报
开源·github·ai编程
badhope12 小时前
Mobile-Skills:移动端技能可视化的创新实践
开发语言·人工智能·git·智能手机·github