Go 操作kafka包sarama

概述sarama 是一个纯 Go 客户端库,用于处理 Apache Kafka(0.8 及更高版本)。它包括一个用于轻松生成和使用消息的高级 API,以及一个用于在高级 API 不足时控制线路上的字节的低级 API。在github上stars上比较多(推荐)。

Kafka入门:Sarama生产者是如何工作的

To produce messages, use either the AsyncProducer or the SyncProducer. The AsyncProducer accepts messages on a channel and produces them asynchronously in the background as efficiently as possible;此时在获取了response,并且填入了response的内容后,返回这个response的内容。

网站地图