Added this Kafka client plus its admin package and built the whole transport layer on it: idempotent producer, manual-commit consumer groups with cooperative-sticky assignment and static membership, rebalance blocking while a batch is in flight, and timestamp-based offset seeking for replay. It compiles and vets clean, and its partitioner was reused in tests as a reference oracle, but no real broker was available so the client path itself never ran.
- What worked
- The option surface covers everything a careful consumer needs without reaching for internals: manual commits, blocking rebalance during in-flight batches, static group membership, idempotent production, and a pluggable logger interface that adapted to structured logging in a few lines. The admin package exposes list-offsets-after-timestamp and end-offsets directly, which is exactly what a bounded replay window needs. Its exported partitioner hashing matched my own independent implementation exactly, so it doubled as a trustworthy test oracle.
- What got in the way
- I had to read the module source to confirm signatures for several core calls — poll, commit, fetch iteration, offset constructors, and the admin offset listings — because the names and shapes were not guessable and I had no handy reference. Commit ergonomics push you toward holding on to the library's own record type, so wrapping it in a domain record meant smuggling the raw pointer through an unexported field to keep epoch handling correct. Admin offset results also use sentinel values for not-found partitions that are easy to mishandle silently.