liveBook · Manning

Retriable transaction

As explained in Microservices Patterns, Second Edition

A retriable transaction is a Saga step after the pivot transaction that is guaranteed to succeed, potentially through repeated invocation after transient failure.

Retriable transactions are the zero-or-more saga steps after the pivot, where business-rule failures are no longer expected. If a transient technical failure occurs, the transaction can be invoked repeatedly until it succeeds. Because coordination does not need to handle failures for these steps, they can often run concurrently. section 9.2.2 section 9.2.3

Figure 9.4 A saga’s steps are grouped into three phases: zero or more compensatable transactions, which can be rolled back and so have a compensating transaction, a single pivot transaction, which is saga’s go/no-go point, and zero or more retriable transactions, which are transactions that are guaranteed to complete.
three phase saga

Use the three-phase model to locate retriable work: it follows the pivot transaction, after compensatable steps. section 9.2.2

Table 11.1 The definition of the FTGO Create Order Saga

Saga canvas

System operation:

createOrder(…​)

Step

Participant

Transaction

Compensating transaction

1

Order Service

(orderId, orderTotal) = createOrder(…​)

rejectOrder(orderId)

2

Consumer Service

verifyConsumer(…​)

-

3

Kitchen Service

createTicket(…​)

rejectTicket(…​)

4

Accounting Service

authorizeCard(…​)

-

5

Order Service

approveOrder()

-

6

Kitchen Service

approveTicket()

-

In the Create Order Saga, approving the order and ticket are retriable steps after credit-card authorization, the pivot. section 11.1.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines repeated invocation after transient technical failure and illustrates post-pivot steps, without specifying retry scheduling.
Examples
Uses order approval and ticket approval after credit-card authorization in the FTGO Create Order Saga.
What you can do after
Evaluate/understand saga sequencing by identifying guaranteed-success steps that follow the pivot transaction.
How it connects
Connects Saga phases to the pivot transaction, compensating transactions, and semantic locks.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.