Tag: Idempotency
All the articles with the tag "Idempotency".
-
Same cancellation, different events: why I put event classification in one place with an outbox
When the resulting state is the same "cancelled" but the receiver wants a different event depending on the situation, where should the event type be decided? I compared three options: the producer passes a reason, a second detector writes the event, or the consumer classifies the state transition. With an outbox whose rows commit separately, two deciders could announce the same cancellation twice. The example is an unpaid booking passing its payment deadline.
-
Payment deadlines that keep moving: why I kept the timers in a MySQL ledger
I built a delayed job that cancels unpaid bookings once their payment deadline passes. The deadline keeps changing, the cancellation can't be undone, and the change notifications arrive duplicated or out of order. After comparing Temporal, db-scheduler, Quartz, Kafka and Redis, I kept the timers as rows in a MySQL table. This post also records what changed between the design and the implementation, and why.
-
External API Calls Inside Transactions — Reproducing Pool Exhaustion and Comparing Simple Split, Saga, and Outbox by Measurement
I reproduced HikariCP pool exhaustion caused by external API calls inside transactions in a Spring + raw JDBC environment, then compared three remedies — Simple Split, Saga, and Outbox — across 60 workers × 9 chaos scenarios. I caught the moment Simple Split breaks consistency as 60 mismatched records, watched Saga's three-tier safety net trigger in sequence, and saw how Outbox's 72ms ACK and 93-second average completion split the same dataset into opposite conclusions depending on which metric you read.