"Then" block is executed even if "TransitionTo" is rollbacked

16 views
Skip to first unread message

Roman Prykhodko

unread,
Nov 30, 2016, 3:58:34 AM11/30/16
to masstransit-discuss

Hi, guys.

In this block 


During(Active,

When(Submitted)

.Then(...)

.TransitionTo(Ordered),

 

We can get the following situation:  all code in Then block has been executed, but  TransitionTo  has started but then i's transaction rollbacked for some reason (i.e. deadlock and so on). It's OK with TransitionTo  - it will be repeated due to Retry mechanism. But as for Then - we get situation when it executed when it must't to do it and i't action cant't be rollbacked. How can I solve this problem? How can I be ensured that TransitionTo  has committed successfully and only than execute Then  block?

Executing 
TransitionTo before Then doesn't help, because TransitionTo and Then are executing concurrently, and in most cases  Then is faster.


Reply all
Reply to author
Forward
0 new messages