Skip to content

Fence the dedup claim with a token - #35

Merged
thomasdarimont merged 1 commit into
mainfrom
gh-34-dedup-claim-fencing
Oct 5, 2026
Merged

thomasdarimont merged 1 commit into
mainfrom
gh-34-dedup-claim-fencing

Conversation

@thomasdarimont

Copy link
Copy Markdown
Collaborator

claim() returns the claim's token, the PROCESSED_AT it wrote in the JDBC store and a counter in memory, and processed() and forget() only touch the claim that still carries it. An instance whose handlers outlived the lease can therefore neither mark the taker-over's claim processed nor delete it, so a redelivery never runs concurrently with the new holder.

Closes #34

claim() returns the claim's token, the PROCESSED_AT it wrote in the JDBC
store and a counter in memory, and processed() and forget() only touch
the claim that still carries it. An instance whose handlers outlived the
lease can therefore neither mark the taker-over's claim processed nor
delete it, so a redelivery never runs concurrently with the new holder.

Closes #34

Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>
@thomasdarimont
thomasdarimont merged commit 36597ef into main Oct 5, 2026
10 checks passed
@thomasdarimont
thomasdarimont deleted the gh-34-dedup-claim-fencing branch October 5, 2026 23:51
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.

Fence the dedup claim so a late holder cannot finish or forget another instance's claim

1 participant