knative-extensions / knative-extensions/func-go
Example: idempotent Kafka handler with deduplication
- Dominant language
- Go
- Stars
- 7
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
The middleware provides at-least-once delivery — after a consumer rebalance or crash, a message may be redelivered. Making the handler idempotent is the user's responsibility.
Create an example function that demonstrates the pattern: track processed message offsets (or message keys) in an external store like Redis, and skip duplicates in the handler.
Contributor guide
Research direction
No file or test is named; start by locating the existing function examples and the middleware's at-least-once delivery behavior. Add an example showing processed offsets or message keys stored externally and duplicate messages skipped, with the example making the idempotent handler pattern clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kafka, redis
- Domain
- backend, distributed-systems
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100