Document idempotency / deduplication guidance for Kafka functions
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- kafka
- Domain
- documentation
Research direction
Start by locating the language-agnostic Kafka documentation and examples in the func project; the issue does not name specific files or tests. Explain stable event keys, storing processed keys in Redis or a database, skipping duplicates, and the latency and retention trade-offs. Done means the guidance makes clear that delivery is at-least-once and exactly-once is not provided, with a small example if practical.
Written by the indexing model from the issue text.
Description
Kafka delivery to a function is at-least-once: after a consumer rebalance or a crash between delivery and offset commit, a record can be delivered more than once. Making the handler tolerate redelivery (idempotency / deduplication) is the function author's responsibility, and this is the same for every language now that the Kafka runtime is a language-agnostic sidecar.
Provide guidance (and ideally a small example) covering the pattern: derive a stable key for each event (the CloudEvent id, or a Kafka key/partition+offset), record processed keys in an external store (e.g. Redis or a database), and skip an event whose key has already been processed. Note the trade-offs (store latency on the hot path, TTL/retention of the dedup set, exactly-once is not provided).
This supersedes the func-go-specific example request now that the in-process middleware is retired; it belongs on the func side as language-agnostic docs/example.
/kind documentation
- Dominant language
- Go
- Stars
- 366
- Forks
- 226
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from knative/func
-
Kafka sidecar: add a startupProbe so slow-starting functions aren't restart-loopedPossibly taken @aliok claimed this 1 day ago. Openkind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
knative/func#4097 · 1 assignee ·
Maintainers usually reply within 1 day
-
KEDA deployer: default minReplicaCount prevents scale-to-zeroPossibly taken @Tushar-Khandelwal-2004 claimed this 114 days ago. Openlifecycle/stale
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
knative/func#3924 · 1 comment ·
Maintainers usually reply within 1 day
-
git/gitlab: default project webhooks to SSL verification when creating hooksPossibly taken @Vi-shub claimed this 161 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
mcp: config add/remove handlers bypass readonly guardPossibly taken @Elvand-Lie claimed this 163 days ago. Openkind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
knative/func#3704 · 1 comment ·
Maintainers usually reply within 1 day
-
kind/cleanup
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
native
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
prime-radiant-inc/evener#4839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4073 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
goharbor/terraform-provider-harbor#655 · 1 comment ·