WCF and MSMQ error handling

Can someone explain to me the difference between these three message processing approaches that do not deliver?

  • Reflection Queue Service
  • Dead letter queue service
  • Using the response service to handle failures

I have WCF Programming, but I really don’t understand when you will use one of them over the other, or when it makes sense to use more than one of them. Thanks!

+6
c # queue wcf msmq
source share
2 answers

Dead and poison are two different concepts. Poison messages are messages that can be read from the queue, but your code does not know how to handle it, so your code throws an exception. If this continues for some time, you want this message to be placed in a different queue so that other messages can be processed. A good aproach for this is described on MSDN .

A dead letter is a message that is not even processed in the queue. The network is damaged or the MSMQ receiver computer is turned off. Something like that. The message will be automatically placed in a dead queue after some time Windows. Therefore, it is recommended that you write a service that monitors the dead queue.

+8
source share

Poison / dead letter message pylons are used to place messages that have been identified as invalid in a queue that will no longer attempt to deliver them. You would do this if you wanted to manually look at the failed messages and process them later. You use these types of queues when you want bad messages to degrade the performance of your system by repeating over and over again.

On the other hand, the response service will be used to notify the sender that the error message has been processed. Usually in this case, you do not plan to manually handle the bad message and you must allow the system that sent the message that the request was rejected.

Please note that they are not exclusive. If you use queues, there is always the possibility that the serialization of messages may change enough to break the messages in the queue, in which case you can still have a dead letter queue, even if you use the reply service.

+2
source share

All Articles