sarama README

The project's README from github.com/IBM/sarama. As one markdown file: README.md.

sarama

Go Reference OpenSSF Scorecard OpenSSF Best Practices

Sarama is an MIT-licensed Go client library for Apache Kafka.

Getting started

You might also want to look at the Frequently Asked Questions.

Compatibility and API stability

Sarama provides a "2 releases + 2 months" compatibility guarantee: we support the two latest stable releases of Kafka and Go, and we provide a two month grace period for older releases. However, older releases of Kafka are still likely to work.

Sarama follows semantic versioning and provides API stability via the standard Go module version numbering scheme.

A changelog is available here.

Contributing

sarama (IBM/sarama)

Searching Database…

12.5K ·GitHub
这是什么?Sarama 是一个用于 Apache Kafka 的 Go 客户端库,让 Go 应用程序能够生产和消费 Kafka 消息。
这是独立的工具,还是我要在 Go 代码里导入的库?它是一个需要在 Go 应用中导入的库;另外还提供用于测试的 mock 包,以及一些用于诊断的命令行工具。
怎样把它添加到项目里?将它作为 Go 模块依赖添加进来,然后在 pkg.go.dev 上的 API 文档,或 examples 目录中查看用法示例。
是否需要特定版本的 Kafka 或 Go?需要相对较新的 Kafka broker 和 Go 工具链;Sarama 对两者都遵循“2 个版本加 2 个月”的兼容窗口。
较旧的 Kafka 版本还能用吗?官方没有正式保证,但它们大概率仍然可以正常工作。
在哪里能找到真实的使用示例?仓库中的 examples 目录包含一些更完整的示例应用,展示了如何在实际项目中使用 Sarama。
在没有真实 Kafka broker 的情况下,能为使用 Sarama 的代码编写测试吗?可以,Sarama 专门提供了一个 mocks 子包,让你可以用模拟的 Kafka 响应来测试代码。
更深入的技术文档在哪里?Sarama 的 wiki 介绍了更多技术和设计细节,协议层面的理解则可以参考 Kafka Protocol Specification。
What are similar projects?redpanda, picomq, kafgres, architect-awesome, encore, iii, kafka-ui, emqx
Creator
IBM
Size
12.5 MB
Stars
12.5K
Age
13y
Commits · 90 Days