0
votes

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. 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.

What does NServiceBus do differently when it creates queues that I cannot do manually? 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.

1
What Version of NServiceBus are you running? - Sean Farmar
We are using NServiceBus 3.2 - MattB
Are you trying to migrate your timeout messages from one endpoint to another? - Sean Farmar
(NSeerviceBus creates private transnational queues.) if they are consumed from the queue it means they are processed by the endpoint, did you check ravenDB's timeout documents? - Sean Farmar
Basically, NServiceBus has deferred messages that are queued up to run at 5AM every morning. We are doing a release in which we want to use those messages to test new functionality. Our attempt was to create a queue to move those messages into for holding so they weren't processed by the service. In attempting to manually create a message queue, I tried copying some existing auditing messages into the queue to test, and the messages fell out into the dead letter queue. - MattB

1 Answers

-1
votes

The Sample code for sending message using 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");