如何保证NServiceBus按顺序运行
我们要求所有消息都按顺序处理。我的意思不是指 Saga,而是每条消息在从总线上取下时都会被处理。如果消息出错,我们预计进程将停止处理其他消息,直到出错的消息达到其重试限制。
无论如何,NServiceBus 可以处理这样的要求吗?
We have a requirement for all our messages to be processed in sequence. I don't mean in terms of a Saga but that each message is processed as it is picked off the bus. If a message errors we expect that the process will halt processing other messages until the errored message has reached its retry limit.
Is there anyway that NServiceBus can handle such a requirement?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只是一个想法,但是将设置 NumberOfWorkerThreads="1" 和一个处理程序进程结合起来可以为您做到这一点吗?
这样一次只会处理一条消息。
Just a thought, but would having a combination of setting NumberOfWorkerThreads="1" and just one handler process do this for you?
That way only one message will be processed at a time.
据我所知,msmq 不保证事务中的正确顺序交付。
As I know msmq do not garantee right sequence delivery out of transaction.