简体   繁体   English

在MSMQ中创建新队列,消息丢失

[英]Creating new queue in MSMQ, messages fall out

My office currently utilizes NServiceBus and we plan a release soon in which we will be required to halt a service and move those messages out of its queue for their deferred timeout messages and move them in one by one to test a piece of new functionality. 我的办公室目前使用NServiceBus,我们计划很快发布一个版本,该版本将要求我们暂停服务并将这些消息移出队列以获取其延迟的超时消息,并逐个移动它们以测试一项新功能。 I have attempted to create queues manually and cannot seem to figure out why messages will not remain in the queue after copying. 我试图手动创建队列,但似乎无法弄清楚为什么复制后消息不会保留在队列中。 I have created both a transactional and non-transactional version of the queue. 我已经创建了队列的事务版本和非事务版本。 I have tried to copy messages from my audit queue into both of the newly created queues and instead those messages fall out into their respective dead-letter queues. 我试图将邮件从我的审核队列复制到两个新创建的队列中,而这些消息落入它们各自的死信队列中。 I am using an application called Queue Explorer to handle moving messages from one queue to another. 我正在使用一个名为Queue Explorer的应用程序来处理将消息从一个队列移动到另一个队列的问题。

What does NServiceBus do differently when it creates queues that I cannot do manually? NServiceBus创建无法手动执行的队列时,NServiceBus有何不同之处? Are there any tips someone can offer to alleviate my issues? 有人可以提供一些技巧来缓解我的问题吗? If anyone has any advice as to what I can try differently, it would be much appreciated. 如果有人对我可以尝试的方法有任何建议,将不胜感激。

The Sample code for sending message using MSMQ 使用MSMQ发送消息的示例代码

        MessageQueue messageQueue = null;
        if (MessageQueue.Exists(@".\Private$\SomeTestName"))
        {
            messageQueue = new MessageQueue(@".\Private$\SomeTestName");
            messageQueue.Label = "Testing Queue";
        }
        else
        {
            // Create the Queue
            MessageQueue.Create(@".\Private$\SomeTestName");
            messageQueue = new MessageQueue(@".\Private$\SomeTestName");
            messageQueue.Label = "Newly Created Queue";
        }
        messageQueue.Send("Teste message sends by bawar", "Title");

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

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