0

Is it possible to implement two-phase transaction pattern if we want to get tasks execute in parallel instead of serial?

I mean, let us have two tasks: A, B. This tasks may be performed independently in parallel. A transaction is considered complete when both tasks, A and B, completed successfully. If task A succeeds but task B failed, then we should compensate task A. Can this behaviour be configured by means of Mass-Transit Courier?

gre_gor
  • 6,669
  • 9
  • 47
  • 52
monco
  • 1

2 Answers2

1

MassTransit Courier is a routing slip implementation in which activities are executed sequentially. There is no facility for parallel execution.

Chris Patterson
  • 28,659
  • 3
  • 47
  • 59
0

There is a project that support parallel execution of tasks.

https://github.com/dtm-labs/dtm

https://github.com/dtm-labs/dtmcli-csharp

What you want is the saga pattern with the option Concurrent on.

gopher
  • 51
  • 3