Interfaces
Event identifiers remain stable across offline retries. Which conditions ensure this outcome?
The device may lose the acknowledgement.
Starting point Calculate storage capacity and goods quantities separately.
Assumptions for the example case
A fictional shipment of 100 boxes of hygiene supplies between a warehouse and a distribution point. Local inventory ownership remains clear; offline devices document assigned shipments. All quantities, thresholds and operational targets in this design are illustrative assumptions.
Offline evidence
Persist offline evidence before changing quantities
U-49 is first stored immutably; the evidence reference and quantity effect then commit together before acknowledgement.
Proposed domain contracts
- POST
/sendungen/S-49/versandDeduct assigned goods from inventory.
- Input
- commandKey, batch=C-49, quantity=100, warehouseVersion, carrierReceiptHash
- Result
- Shipped with 100 boxes or stock conflict.
- Retry behaviour
- Identical dispatch is applied once; a changed quantity causes a conflict.
- POST
/sendungen/S-49/empfangDurably accept an offline receipt record.
- Input
- deviceId, eventId=U-49, shipmentRevision, accepted=98, damaged=2, receivedAt, proofHash
- Result
- Receipt accepted; discrepancy resolution remains open.
- Retry behaviour
- The same event identifier and content apply once; changed quantities require a separate correction operation.
Event identifiers remain stable across offline retries.
Replay uses the same identifier and payload.
The device may lose the acknowledgement.
One stored receipt record, the same response. Conflict; a correction requires its own reference and domain review.
- Alternative considered
- A new identifier for each attempt creates duplicate quantities.
- Trade-off
- The device must persist the identifier.
- Reassess
- Device replacement needs a recovery contract.
Try it yourself
Check Replay 98/2 and Change 99/1.
A hint for your attempt
The device may lose the acknowledgement.
Compare with a possible solution
- Identical
- One stored receipt record, the same response.
- Changed
- Conflict; a correction requires its own reference and domain review.
Apply to your project
How does “Event identifiers remain stable across offline retries” apply to your own project?