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
相关推荐
ai小鬼头2 小时前
AIStarter新版重磅来袭!永久订阅限时福利抢先看
人工智能·开源·github
如何原谅奋力过但无声2 小时前
上传GitHub步骤(自用版)
github
jingshaoqi_ccc4 小时前
GitKraken最后一个免费版本和下载地址
git·github·gitkraken·版本管理工具
乌云暮年4 小时前
Git简单命令
git·gitee·github·batch命令
宛西南浪漫戈命8 小时前
Centos 7下使用C++使用Rdkafka库实现生产者消费者
c++·centos·linq
高hongyuan8 小时前
Go语言教程-占位符及演示代码
开发语言·后端·golang
Albert_Lsk9 小时前
【2025/07/10】GitHub 今日热门项目
人工智能·开源·github·开源协议
一块plus11 小时前
一门原本只是“试试水”的课程,没想到炸出了一群真诚的开发者
javascript·面试·github
风无雨12 小时前
GO启动一个视频下载接口 前端可以边下边放
前端·golang·音视频
GoGeekBaird15 小时前
使用GoHumanLoop拓展AI Agent人机协同边界,这次连接到飞书
人工智能·后端·github