Search⌘ K
AI Features

SEC Package Addition and Order Creation Process Conversion

Explore how to add the SEC package and convert the order creation process into a saga-based orchestrated workflow. Understand the components like the orchestrator, saga definition, and steps, and see how to implement commands in various microservice participants to enable reliable distributed transaction management.

Adding an SEC Package

The SEC is made of a few parts:

  • An orchestrator, which uses a saga for logic and connects it with a repository and publisher.

  • A saga definition, which holds all the metadata and the sequence of steps.

  • The steps that contain the logic for the actions, the reply handlers, and their compensating counterparts:

How the SEC components come together
How the SEC components come together

Much of this might seem novel or new if you are not very familiar with this pattern, so let’s take a closer look at the three main parts of this implementation.

Using generics in the SEC
The implementations in the sec package make use of generics to allow the saga data payload to be used with ease in the actions and the Reply handlers that will need to be maintained in the application. ...

The orchestrator