Can someone explain to me the difference between these 3 approaches to processing messages that fail delivery?
- Poison Queue service
- Dead-Letter Queue service
- Using a response service to handle failures
I have ‘Programming WCF’, but I don’t really understand when you would use one of these over another, or when it would make sense to use more than one of them. Thanks!
Dead and poison are two different concepts. Poison messages are messages that can be read from the queue, but your code doesn’t know how to handle it so your code gives an exception. If this goes on for some time you want this message to be put on a different queue so your other messages can be handled. A good aproach for this is described on MSDN.
A dead letter is a message that isn’t even handled by the queue. The network is broken or the receiving MSMQ computer is shut down. Something like that. The message will automaticly be put on the dead queue after some time by Windows. So it’s advisable to write a service that monitors the dead queue.