I'm trying to add functionality to a system support website that will move messages from the poison queue back to the processing queue. This is what I've attempted so far:
// path = "FormatName:DIRECT=OS:machine-name\private$\queue-name";
var poisonQueue = new MessageQueue(path + ";poison");
var processingQueue = new MessageQueue(path);
foreach(var message in poisonQueue.GetAllMessages())
{
processingQueue.Send(message);
}
var poisonCount = poisonQueue.GetAllMessages().Count();
var processingCount = processingQueue.GetAllMessage().Count();
Unfortunately, Send()
doesn't seem to be doing anything. The debugger shows the counts as:
poisonCount: 6
processingCount: 0