0

I am using the outbox pattern in MassTransit with Entity Framework and RabbitMq in my application.

I found that if I just publish the message to the bus using IPublishEndpoint it will not be published until I do DbContext.SaveChangesAsync().

I understand that this is by design, but I don't need (want) to use outbox for every messages. I.e. I have some messages that are not important to be sent through the outbox, and for that I don't want to require the injection of DbContext just so I can send the message.

In short, I only want to use the outbox when there is a database involved in a process, i.e. update an entity and send the message (here the database is involved in a process/transaction and here I want the outbox, but when I only need to notify other services of something or just to forward a message, I don't want to use the outbox for that).

Is this possible?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.