Diagram explorer

A lost reply, a safe retry

Sequence between a caller, an order service, its ledger with an outbox table, and an ERP.

Read the full description

One: the caller posts an order with request key K. Two: the service writes the order and its outbound message in one database transaction. Three: the 201 Created reply is lost in transit. Four: the caller times out and retries with the same key. Five: the service finds key K and creates no second order. Six: it returns the original result. Seven: a relay delivers the outbound message to the ERP at least once. Eight: the ERP acknowledgement closes the outbox row. The oldest open row is the figure an operator watches.

Relationship map
01 Order with key K02 Order and outbox03 Lost response04 Use the same key05 Find the committed order06 Original response07 At-least-once delivery08 ERP acknowledgement09 Oldest outstanding event
01 / 09

Order with key K

One: the caller posts an order with request key K.

02 / 09

Order and outbox

Two: the service writes the order and its outbound message in one database transaction.

03 / 09

Lost response

Three: the 201 Created reply is lost in transit.

04 / 09

Use the same key

Four: the caller times out and retries with the same key.

05 / 09

Find the committed order

Five: the service finds key K and creates no second order.

06 / 09

Original response

Six: it returns the original result.

07 / 09

At-least-once delivery

Seven: a relay delivers the outbound message to the ERP at least once.

08 / 09

ERP acknowledgement

Eight: the ERP acknowledgement closes the outbox row.

09 / 09

Oldest outstanding event

The oldest open row is the figure an operator watches.