MSMQ中的事务队列可能出现乱序消息吗? [英] Out of order messages possible with transactional queues in MSMQ?

查看:70
本文介绍了MSMQ中的事务队列可能出现乱序消息吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是消息传递的新手,对于MSMQ是否可以为事务队列传递乱序消息,我还不清楚.我想这一定是因为如果未正确处理一条消息(并且由于我们将使用多个竞争使用者"),那么其他使用者可以继续处理消息,而失败的消息将重新放入队列.似乎无法在此任何地方找到黑白答案.

I'm new to messaging and a little unclear as to whether it is possible for MSMQ to deliver out-of-order messages for transactional queues. I suppose it must be because if a message is not processed correctly (and since we will be using multiple "competing consumers"), then other consumers could continue to process messages while the failed message is placed back on queue. Just can't seem to find a black-and-white answer anywhere on this.

推荐答案

  • 黑白否定答案很难找到(它们通常不存在).
  • 您在这里混淆了两个词(我认为).传递是从发件人到队列.消费是从队列到消费者.这两个动作不能放在同一笔交易中.它们是完全独立的动作(这是排队的要点之一)
  • 更重要的一点:来自" Microsoft消息队列服务(MSMQ)提示"

    More to the point: from "Microsoft Message Queuing Services (MSMQ) Tips"

    这些消息要么按照发送的顺序一起发送,要么根本不发送.此外,从同一台计算机启动到同一队列的连续事务将以它们相对于彼此提交的顺序到达.

    That these messages will either be sent together, in the order they were sent, or not at all. In addition, consecutive transactions initiated from the same machine to the same queue will arrive in the order they were committed relative to each other.

    这是msmq中命令的唯一情况.

    This is the only case of order in msmq.

    可悲的是,您找不到关于订购消费的任何东西,因为它不相关.您可以通过任何方式使用来自msmq的消息.

    Sadly you won't find anything about ordered consuming because its not relevant. You can consume messages from msmq any way you want.

    更新:如果您必须订购处理程序,那么我看不出使用许多消费者的原因.您将必须在代码中实现订单.

    Update: If you must have ordered processing, than I don't see the reason to use many consumers. You will have to implement the order in your code.

    这篇关于MSMQ中的事务队列可能出现乱序消息吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆