我正在尝试向系统支持网站添加功能,以便将来自毒药队列的消息移回处理队列。这是我到目前为止所尝试的:
// 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
答案 0 :(得分:2)