We rely on both Go and Kafka a lot at Segment. Unfortunately, the state of the Go client libraries for Kafka at the time of this writing was not ideal. sarama, which is by far the most popular but is quite difficult to work with. It is poorly documented, the API exposes low level concepts of the Kafka protocol, and it doesn't support recent Go features like contexts. It also passes all values as pointers which causes large numbers of dynamic memory allocations, more frequent garbage collections, and higher memory usage. confluent-kafka-go is a cgo based wrapper around librdkafka, which means it introduces a dependency to a C library on all Go code that uses the package. It has much better documentation than sarama but still lacks support for Go contexts. goka is a more recent Kafka client for Go which focuses on a specific usage pattern. It provides abstractions for using Kafka as a message passing bus between services rather than an ordered log of events.

Features

  • Programs do not need to import compression packages
  • Compression codecs are now exposed in the compress sub-package
  • The experimental kafka.Client API has been updated and slightly modified
  • kafka-go is currently compatible with Kafka versions from 0.10.1.0 to 2.1.0
  • kafka-go is currently compatible with golang version from 1.15+
  • The Conn type is the core of the kafka-go package

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow kafka-go

kafka-go Web Site

You Might Also Like
Red Hat Enterprise Linux on Microsoft Azure Icon
Red Hat Enterprise Linux on Microsoft Azure

Deploy Red Hat Enterprise Linux on Microsoft Azure for a secure, reliable, and scalable cloud environment, fully integrated with Microsoft services.

Red Hat Enterprise Linux (RHEL) on Microsoft Azure provides a secure, reliable, and flexible foundation for your cloud infrastructure. Red Hat Enterprise Linux on Microsoft Azure is ideal for enterprises seeking to enhance their cloud environment with seamless integration, consistent performance, and comprehensive support.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of kafka-go!

Additional Project Details

Programming Language

Go

Related Categories

Go Libraries

Registered

2022-01-10