entity framework - MassTransit outbox pattern - Stack Overflow

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

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745273262a4619880.html

相关推荐

  • entity framework - MassTransit outbox pattern - Stack Overflow

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

    1小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信