admin管理员组文章数量:1417579
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?
本文标签: entity frameworkMassTransit outbox patternStack Overflow
版权声明:本文标题:entity framework - MassTransit outbox pattern - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745273262a2651025.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论