liveBook · Manning

Command producer outbound adapter

As explained in Microservices Patterns, Second Edition

A command producer outbound adapter is an outbound adapter that creates and sends command messages to saga participants.

In an asynchronously messaging saga, the command producer outbound adapter sends commands from the orchestrator to participant services. It works alongside participant command handlers, command channels, and an inbound reply handler. section 10.2.4

Choose the interaction style to match the operation:

  • Use request/asynchronous-response when the orchestrator needs the operation’s response. Define a command with the operation and parameters, and a reply channel; the reply indicates success or failure and may contain data. section 10.2.4
  • Use a one-way notification for operations that return no data and cannot fail because of business-rule violations. The orchestrator does not wait for a reply. section 10.2.4
Figure 10.12 The design of the orchestration-based Create Order Saga that uses asynchronous messaging. The orchestrator is embedded in the Order Service. The orchestrator sends command messages to the other participants via their command channels. They send replies to the saga’s reply channel.
simple create order orchestration design async

The Create Order Saga diagram shows the orchestrator sending commands through participant command channels and receiving replies on its saga reply channel. section 10.2.4

How Microservices Patterns, Second Edition covers it

How deep it goes
Describes its place in the saga message flow and message design without detailing adapter implementation.
Examples
Uses the orchestration-based Create Order Saga to illustrate command and reply flow.
What you can do after
Understand how an orchestrator sends commands to participants and receives replies through asynchronous channels.
How it connects
Ties the adapter to saga orchestration, asynchronous messaging, command channels, command handlers, and reply messages.

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.