Commit 4568ce6
committed
Prevent duplicate delivery of a re-fetched already-delivered message
Under push-only delivery a delivered message position can be re-fetched (a
reopen removes it from the clearer's ignore-set before the asynchronous Clear
deletes it from the store) and routed to a fresh QueueManager on restart. That
instance reloaded the idempotency keys but discarded the delivered-positions, so
IdempotencyKeys.Add(sameKey, samePosition) returned true and the message was
delivered a second time.
Seed _fetchedPositions from the persisted DeliveredPositionsId on Initialize so
the existing ProcessMessages skip-check catches a re-fetched delivered position.
Only delivered/skipped positions are seeded, so a recorded-but-not-delivered
message still re-delivers correctly - no message loss.1 parent 06f0bf4 commit 4568ce6
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
| |||
0 commit comments