In one of my statemachine actions I create a routing slip to carry out a series of commands. This is done by calling
_busControl.Execute(routingSlip);
But sometimes the saga commit fails due to concurrency issues. Is there a "outbox" like mechanism to defer sending the routing slip to the bus until the saga is committed successfully?
Yes, you can use the outbox to defer sends:
http://masstransit-project.com/MassTransit/usage/exceptions.html#outbox
You will, however, need to execute the routing slip using the
ConsumeContextin the state machine event handler, and not using_busControl.IBusorIBusControlshould never be used inside a consumer. The documentation has more details.