/
Choreography Pattern

Choreography Pattern

Problem

  • Adding or removing services without breaking existing logic. and, so create a centralized service which is the entry point to multiple services for incoming requests.

  • Make sure that each service completes their responsability and is not aware of the overall workflow.

image-20240826-192751.png
From Microsoft Documentation

Solution

The goal is to buffer requests until downstream components claim and process them.

image-20240826-192947.png
From Microsoft Documentation

A message broker could be the solution to buffer requests from client app : messages will be queued in the message broker.

 

Choreography In Practice

  • The design ensures the choreography to occur in a sequence.

  • To avoid cascading retry operations that might lead to multiple efforts, business services should immediately flag unacceptable messages. It's possible to enrich such messages using well-known reason codes or a defined application code, so it can be moved to a dead letter queue (DLQ).