About this project

go-kafka is a Go module published at github.com/faustbrian/go-kafka under the MIT license. It provides bounded, explicit Apache Kafka producer, consumer, replay, inspection and transactional building blocks for Go services, and is implemented as a wrapper around franz-go. The stated design intent is to avoid hiding delivery outcomes, lifecycle ownership, topic policy or security configuration from the calling application. The README is explicit about scope and limits. The package supplies at-least-once building blocks. It does not make database writes and Kafka publication atomic, does not make consumer side effects exactly once, and does not own topic or broker configuration. Applications remain responsible for reconciling ambiguous publish and commit outcomes, which the library keeps distinguishable. Installation is a single module fetch, go get github.com/faustbrian/go-kafka. In the documented quick start, a ProducerConfig is validated during bootstrap without allocating a client or dialing brokers. The sample sets a broker list, a client identifier and an allowed topic list, calls Validate, then constructs a producer with NewProducer and defers Close. Publishing takes a context and a message carrying topic, key and value bytes. The README notes that topic access is restricted through constructor-copied allowlists, so producers can only address pre-approved topics. The guarantees section lists several concrete behaviors. Producers retain franz-go idempotence, require acknowledgement from all in-sync replicas, and bound retries, buffering, admission and delivery. Consumers expose explicit acknowledgement, retry, dead-letter, rebalance and shutdown behavior. TLS 1.2 or later is the default, while authentication and broker compatibility are described as explicit deployment decisions. Optional modules for service integration, OpenTelemetry and Amazon MSK IAM are listed, each with caller-owned lifecycle rather than lifecycle managed by the library. Documentation is organized in a docs directory, with an index, a compatibility matrix, a specification decision register, a delivery guarantees document, an operations guide and a detailed reference covering the complete producer, consumer, replay, inspection and lifecycle contracts. The README also points to a versioned Golib ecosystem index and its integration and data movement family for comparing this package against companion libraries and optional adapters. For development and release work, the README instructs running golib check against the affected module directory, and make check for repository-wide changes and releases. Backend and managed-service changes are expected to pass applicable integration and interoperability gates as well. Continuous integration and CodeQL status badges, a Go reference badge, release badge and the Go version are shown at the top of the README, with the Go badge indicating version 1.26.6.