tags:

views:

510

answers:

2

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!

+1  A: 

Poison message / dead letter message queues are used to place messages that have been determined to be undeliverable in a queue that will not try to deliver them anymore. You would do this if you might want to manually take a look at failed messages and process them at a later point. You use these type of queues when you want to keep bad messages from degrading the performance of your system by retrying over and over again.

On the other hand, a response service would be used to notify the sender that there was an error processing the message. Typically in this case you aren't planning on manually processing the bad message and need to let the system that sent the message in that the request has been rejected.

Note that these aren't exclusive. If you are using queues, there is always the chance that the message serialization might change enough to break messages that are in the queue in which case you might still want to have a dead letter queue even if you are using a response service.

jezell
I appreciate the answer, but it's not quite what I asked. For one thing, I'd like to know the difference between Poison and Dead Letter. In addition, I'm more asking about the services that process these queues than I am about the queues themselves.
chessguy
+3  A: 

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 here: http://msdn.microsoft.com/en-us/library/ms751472.aspx

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.

Olivier