'Masstransit UseInMemoryOutbox not working with MultiBus Saga?
I implemented a custom activity for supporting multibus saga.
But I found an issue that is I received a published message from SecondBus before the state saga saves to Redis.
I think UseInMemoryOutbox() should handle this or i wrong.
public class TestActivity : Activity<SagaState, IFirstBusRequest>
{
private readonly ISecondBus _secondBus;
public TestActivity(ISecondBus secondBus)
{
_secondBus = secondBus;
}
public async Task Execute(BehaviorContext<SagaState, IFirstBusRequest> context, Behavior<SagaState, IFirstBusRequest> next)
{
var endpoint = await _secondBus.GetSendEndpoint(new Uri($"queue:second-bus-request"));
await endpoint.Send(new { }); // send immediately
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
