bridge/kafka: Include partition in idempotency key - #2429
Merged
svix-jplatte merged 1 commit intoJul 22, 2026
Conversation
baxori
force-pushed
the
bridge-kafka-partition-idempotency
branch
from
June 30, 2026 17:01
50f98ee to
f3c9354
Compare
Member
|
Thanks for the PR! I'm currently pretty busy, but I'll get to reviewing this soon. |
baxori
force-pushed
the
bridge-kafka-partition-idempotency
branch
3 times, most recently
from
July 13, 2026 09:37
35717d6 to
b74b4a2
Compare
svix-jplatte
left a comment
Member
There was a problem hiding this comment.
Looks good to me! Could you please add a changelog entry?
baxori
force-pushed
the
bridge-kafka-partition-idempotency
branch
from
July 22, 2026 13:33
b74b4a2 to
cc29287
Compare
Contributor
Author
|
Thanks! I've added a changelog entry. |
svix-jplatte
approved these changes
Jul 22, 2026
svix-jplatte
enabled auto-merge (squash)
July 22, 2026 14:07
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The current Kafka sender idempotency key uses
group_id,topic, andoffset.Kafka offsets are unique only within a partition, not within a topic. Because of that, two distinct Kafka records from different partitions can produce the same idempotency key.
This can cause Svix to deduplicate non-duplicate messages.
This changes the idempotency key format. Replayed records that cross an upgrade boundary may not deduplicate against keys produced by older bridge versions. This is limited to replay and reprocessing scenarios.
Solution
partitionin the sender idempotency keyidempotency-keyheader sent by the Kafka bridge consumerTest plan
cargo fmt --package svix-bridge-plugin-kafkacargo test -p svix-bridge-plugin-kafkaIf you'd prefer a migration-oriented rollout, I'm happy to adjust the approach.