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

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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