简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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