简体   繁体   English

将有毒消息移至处理队列

[英]Moving poison messages to processing queue

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. 不幸的是, Send()似乎没有做任何事情。 The debugger shows the counts as: 调试器将计数显示为:

poisonCount: 6
processingCount: 0

You should move poison messages to retry queue and then messages will be processed again 您应将有毒邮件移至重试队列 ,然后再次处理邮件

please look here for more details 请在这里查看更多详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM