How a process manager tracks communication between aggregates

Does the process manager use correlation identifiers or aggregated data to track the process that it controls?

To make this clearer, consider Figure 2 on the Saga on the Sagas :

enter image description here

First of all, is the process manager sending the event OrderConfirmedwrong? I (as a process manager) cannot send events, but only issue commands. Or am I wrong?

Secondly, how does the process manager correlate OrderCreated, SeatsReserved, PaymentReceived events from different aggregates? Is this a correlation identifier that each aggregate honors (and copies), or are these specific identifiers (for example, SeatsReserved has an order identifier that refers to a set of orders)?

, , ? , , PlaceOrder(order_id, correlation_id)? , PlaceOrder(order_id), OrderCreated(order_id, corr_id)? ( ), ? , , ?

.

+4
4

Process Manager, @Vaughn Vernon

, Process Manager Process, , . Id - , (/) . Process, Process Tracker. .

, . , , .. , ProcessFinished, "".

Process Manager Long Running Process. .

~

< > <

+4

, , , CQRS PHP

, , OrderConfirmed, ? ( ) , . ?

. . Aggregates Domain Events Commands. , Microsoft MarkOrderAsConfirmed command, OrderAggregate.

-, OrderCreated, SeatsReserved, PaymentReceived ? , ( ), (, SeatsReserved , )?

Aggregates, . -- OrderAggregate, .

, , ? , , PlaceOrder (order_id, relation_id)? , PlaceOrder (order_id), OrderCreated (order_id, corr_id)? ( ), ? , , ?

. . , , ( Saga) CommandDispatcher ( , Commands, Sagas) Metadata.

UPDATE: ? , , "" .

+2

: "" " ", . , , , ( NServiceBus).

, :

  • : . - , - . , , " ". ProcessManager , OrderConfirmed , , , , - , . . .

  • , id id ==, , , , . , (, , ). , , , . , . , == == id == id , .

MassTransit Chris Patterson.

+2

Process Manager . Id . , , , . , . . , , , , , , . Shuttle.Esb : .

. , , , . ( ) , , , , .

, . / , . , , , . , " /", ( ).

. , . , , :)

+1

Source: https://habr.com/ru/post/1671471/


All Articles