我正在尝试向系统支持网站添加功能,该网站会将消息从毒物队列移回处理队列。这是我到目前为止所尝试的:
// 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();
不幸的是,Send()
似乎什么也没做。调试器将计数显示为:
poisonCount: 6
processingCount: 0