I am trying to use the Masstransit library, implementing the mediator provided by Masstransit to communicate my controller layer with the application layer, and also adding the transactional outbox pattern, but executing my project, when I use the mediator, the context is different when using a simple service.
You can find the source code in this repo https://github.com/leojim06/masstransit-transactional-outbox
My question is, How can I use MassTransit mediator with MassTransit transactional outbox? My intention is to use the MassTransit mediator to communicate the controller layer with the application layer, the same as MediatR works. After that, need to save some information to the database and intercept the insert command with the published message (as the transactional outbox solves the inconsistency issues)
Do you have a different approach to achieving my requirement?