Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.59 KB

File metadata and controls

36 lines (23 loc) · 1.59 KB

Process Managers for KafkaFlow

The main purpose of a process manager is to encapsulate the process specific logic and maintain a central point of control. It’s initiated by a trigger message which could be an event coming out of a bounded context.

NOTE:

It's important to note that the process manager does not perform any business logic. It only routes messages, and in some cases translates between message types.

Microsoft also echoes that:

You should not use a process manager to implement any business logic in your domain. Business logic belongs in the aggregate types.

Typically process managers are using events as inputs, maintain an internal state and produce commands as outputs.

img.png

Process Managers Essentials

The following things are essential for process managers:

  • Process managers are stateful actors.
  • They are strictly consistent with their owned state.
  • Publishing commands is strictly consistent with state changes.

The above means that process managers' state cannot be a simple eventually consistent projection. Process managers either update the state and send messages, or do none of that.

The requirement of being transactionally consistent between the state and published messages implies using the Transactional Outbox pattern.