MattB
MattB

Reputation: 585

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

Upvotes: 0

Views: 302

Answers (1)

bawar khan
bawar khan

Reputation: 1

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");

Upvotes: -1

Related Questions