【问题标题】:How to see new queue MSMQ messages in queue that is bigger than 800-1500 messages?如何查看队列中大于 800-1500 条消息的新队列 MSMQ 消息?
【发布时间】:2015-01-24 03:58:25
【问题描述】:

执行以下窗口: 计算机管理 -> 消息队列 -> 私有队列 -> {MyQueue} -> 队列消息 显示队列中的所有消息或前 1000 条消息?以及如何查看所有消息?

详细说明:

我有一个私有事务 MSMQ 队列,它在队列消息窗口中正确显示,直到队列中的消息数超过 800-1500。然后,当添加新消息时,它不会出现在 {MyQueue} -> Queue messages 窗口中,但是,在 Message Queuing -> Private Queues 窗口中我可以看到 myqueue 中的消息数量有所增加。

我尝试通过代码添加消息(行为如前所述):

    // Create MSMQ message
    var msg = new Message();
    msg.Body = "Hello world";
    msg.Label = "Now you see me";
    msg.UseDeadLetterQueue = true;
    msg.UseJournalQueue = true;
    msg.AcknowledgeType = AcknowledgeTypes.FullReachQueue | AcknowledgeTypes.FullReceive;
    msg.AdministrationQueue = new MessageQueue(@".\private$\audit");

    // Send MSMQ message
    var mq = new MessageQueue(@"FormatName:DIRECT=OS:.\private$\myqueue");
    mq.Send(msg, MessageQueueTransactionType.Single);

更有趣的是,我可以在代码中检索“不可见”的消息:

    // Retrieve MSMQ message
    mq.MessageReadPropertyFilter.SetAll();
    var allMessages = mq.GetAllMessages();

    DateTime today = DateTime.Now.Date;
    var messages = allMessages.Where(m => m.ArrivedTime > today).OrderByDescending(m => m.ArrivedTime).ToList();

对此队列集没有明确限制。

如何查看队列中的所有消息?

a) 在计算机管理 -> 消息队列 -> 私有队列 -> {MyQueue} -> 队列消息

b) 或其他一些免费工具?

【问题讨论】:

    标签: c# msmq


    【解决方案1】:

    我认为这是 Windows 的限制。 不过,我可以建议 MSMQ QXplorer

    免费和开源。

    http://msmqqxplorer.svn.sourceforge.net/

    最新下载地址:

    http://sourceforge.net/projects/msmqqxplorer/files/latest/download?source=files

    【讨论】:

    • Dzięki。该项目的代码很糟糕,但它是增强此解决方案的一个很好的起点。
    猜你喜欢
    • 2018-02-20
    • 2010-12-10
    • 2012-04-23
    • 1970-01-01
    • 2012-03-27
    • 2011-02-15
    • 2012-09-23
    • 2016-08-21
    • 2012-12-28
    相关资源
    最近更新 更多