简体   繁体   English

msmq队列必须是事务性的吗?

[英]Must msmq queues be transactional?

I've just recently gotten into using Rebus, and noticed that it always creates transactional msmq-queues resulting in heavy traffic to the HDD (0,5 - 5mb/sec). 我刚刚开始使用Rebus,并注意到它总是创建事务性的msmq队列,导致硬盘流量很大(0,5 - 5mb / sec)。 Is this intentional - and can something be done to avoid it? 这是故意的 - 可以做些什么来避免它吗?

It's correctly observed that Rebus (with its default MsmqMessageQueue transport) always creates transactional MSMQ queues. 正确地观察到Rebus(具有其默认的MsmqMessageQueue传输)总是创建事务性MSMQ队列。 It will also refuse to work with non-transactional input queues, throwing an error at startup if you created a non-transactional queue yourself and attempt to use it. 它还将拒绝使用非事务性输入队列,如果您自己创建了非事务性队列并尝试使用它,则在启动时抛出错误。

This is because the philosophy in Rebus revolves around the idea that messages are important data , just as important as the data in your SQL Server or whichever database you're using. 这是因为Rebus的理念围绕着消息是重要数据的想法,与SQL Server中的数据或您正在使用的数据库一样重要。

And yes, the way MSMQ implements durability is that messages are written to disk when they're sent, so that probably explains the disk activity you're seeing. 是的,MSMQ实现持久性的方式是在发送消息时将消息写入磁盘,这可能解释了您所看到的磁盘活动。

If you have a different opinion as to how you'd like your system to treat its messages, there's nothing that prevents you from replacing Rebus' transport with something that can work with non-transactional MSMQ. 如果您对系统如何处理其消息有不同的看法,那就没有什么可以阻止您用可以与非事务性MSMQ一起使用的东西替换Rebus的传输。 Keep in mind though, that all of Rebus' delivery guarantees will be void if you do so ;) 但请记住,如果您这样做,Rebus的所有交付保证将无效;)

We had the very same observation, the annoying aspect is that we have 300/500 KB/sec write on disk even when there are no message on the queue. 我们有同样的观察,令人讨厌的方面是,即使队列中没有消息,我们也在磁盘上写入300/500 KB /秒。 It seems that only polling from the queue causes a constant write on disk. 似乎只有队列中的轮询才会导致磁盘上的持续写入。

Gian Maria. 吉安玛丽亚

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM