Critical flow
How does the callback prevent a false or double release?
The critical sequence begins with an already created verification attempt. The person has submitted their evidence to the provider. Now the server processing decides whether the result is valid and usable for the domain decision.
Starting point V-17 is created; the provider event may arrive late, double or in the wrong order.
Assumptions for the example case
Example design: an operator, a verification provider and a specified purpose of use. Identity and other evidence shall be assessed separately. Login, sessions, and rights across multiple applications are not part of this case. Figures and target values are design assumptions; no real people are checked.
V-17 provider event safely applied to I-17
Critical Process · Participant, Time and Lasting Effect
The verification service shall report: V-17; the subject application reads the status stored only afterwards.
- Permanently decoupled: Worker processes the stored inbox later
Result: The domain decision follows callback acceptance; the 2xx response acknowledges receipt.
- Verification service and domain application
- API and Worker
- SQL with Inbox/Outbox
Normal case, duplicate with Worker crash and the old attempt V-16 preserve the same rule: first accept permanently, later check, work exactly once.
Three error cases determine the design
- Double message
- The unique event key prevents a second effect. After a worker crash, the saved entry is processed again.
- Old result after a new attempt
- The worker compares the attempt with the current request state. Conflicting ordering triggers status reconciliation instead of overwriting the state blindly.
- Decision saved, confirmation lost
- The repetition reads the already processed status. A transaction combines domain decision and completion of the inbox entry.
Terms in this step
- At least once
- A message may arrive multiple times. The receiver must ensure that its domain effect occurs only once.
Try it yourself
Go through the event from signature verification to D-17. Predict what will happen to a duplicate and event for V-16.
A hint for your attempt
Check authenticity, provider reference, current attempt, and allowed transition before the effect. Repetitions remain idempotent.
Compare with a possible solution
- Test chain
- The API authenticates E-17 and checks the provider reference and assignment to V-17. The worker checks the current state of I-17, then evaluates D-17. Test an invalid signature and a missing reference; expect 0 decisions and a traceable inbox outcome.
- Duplicate
- The already processed key for E-17 returns the existing inbox and decision state. Test: deliver E-17 three times, including after worker termination; expect exactly one domain effect and an unchanged completion state.
- Obsolete test
- An authenticated event for the old attempt V-16 is accepted and marked as late, while the current I-17 remains unchanged. Test: send V-16 after V-17; expect 0 changes to D-17 and an auditable warning.
Apply to your project
What delayed or repeated message could create an incorrect state in your system?