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
相关推荐
Zzz 小生9 小时前
LangChain Streaming-Overview:流式处理使用完全指南
人工智能·python·语言模型·langchain·github
普通网友13 小时前
PL/SQL语言的正则表达式
开发语言·后端·golang
一个处女座的程序猿O(∩_∩)O16 小时前
Go语言Map值不可寻址深度解析:原理、影响与解决方案
开发语言·后端·golang
用户5798547697117 小时前
04:工具系统设计:从抽象基类到 JSON Schema 的完整实现
github
fchampion17 小时前
最终一致性
java·spring·rabbitmq·github·mvc
猫头虎19 小时前
OpenClaw 常用操作命令完整速查手册:终端 CLI 操作指令详解|聊天斜杠指令详情
运维·git·容器·开源·github·aigc·ai编程
呆萌很20 小时前
Go语言常用基本数据类型快速入门
golang
一只理智恩1 天前
AI 实战应用:从“搜索式问答“到“理解式助教“
人工智能·python·语言模型·golang
阿里嘎多学长1 天前
2026-02-20 GitHub 热点项目精选
开发语言·程序员·github·代码托管