Skip to content

feat(kafka): add franz-go protocol binding#1277

Open
akme wants to merge 1 commit intocloudevents:mainfrom
akme:main
Open

feat(kafka): add franz-go protocol binding#1277
akme wants to merge 1 commit intocloudevents:mainfrom
akme:main

Conversation

@akme
Copy link
Copy Markdown

@akme akme commented Apr 17, 2026

Summary

Adds a new Kafka protocol binding based on franz-go to address the feature request in #1233.

This PR introduces a new module at protocol/kafka_franz/v2 with:

  • CloudEvents message decoding from kgo.Record
  • CloudEvents encoding into kgo.Record
  • franz-go based sender / receiver protocol support
  • topic override support via cecontext.WithTopic
  • message key support via WithMessageKey
  • ACK-driven offset commits for protocol-owned franz-go clients

Why

Many Go services already use franz-go as their Kafka client. Without a native binding, users have to maintain custom adapters to integrate franz-go with the CloudEvents SDK.

This adds a first-class franz-go transport alongside the existing Sarama and Confluent Kafka bindings.

Additional changes

  • Adds unit tests covering:
    • message encoding / decoding
    • protocol send behavior
    • ACK to commit behavior
    • fetch error handling
  • Updates protocol documentation to list the new franz-go Kafka binding

Validation

  • env GOCACHE=/tmp/go-build-cache go test ./... in protocol/kafka_franz/v2

@akme akme requested a review from a team as a code owner April 17, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant