tags:

views:

163

answers:

1

I have a Microsoft Message Queue that gets populated with messages. If there is a problem with the processing of the message, I would like to retry the message, I do not want to retry the message immidiatley. Is there a way to add a delay to the message in the MSMQ to avoid it being available for a certain amount of time??

The other alternative is to have another queue (A retry queue) and read that queue every 15 minutes, But i would rather not do this.

A: 

What you are looking for is "Poison Message Handling" ( even if its not the message fault, but an temporary environment problem ).

There are lots of articles on that. Here are some:

Poison Message Handling in MSMQ 3.0
Poison Message Handling in MSMQ 4.0
Surviving poison messages in MSMQ

In short: you have to move them to a retry queue.

Igal Serban