As discussed in Chapter 6, a connected call may fail due to either communication failures or service-side errors. Similarly, a queued call can fail due to delivery failures or service-side playback errors. WCF provides dedicated error-handling mechanisms for both types of errors, and understanding them and integrating your error-handling logic with them is an intrinsic part of using queued services.
While MSMQ can guarantee delivery of a message if it is technically possible to do so, there are multiple examples of when it is not possible to deliver the message. These include but are not limited to:
As you will see shortly, each message has a timestamp, and the message has to be delivered and processed within the configured timeout. Failure to do so will cause the delivery to fail.
If the security credentials in the message (or the chosen authentication mechanism itself) do not match up with what the service expects, the service will reject the message.
The client cannot use a local nontransactional queue while posting a message to a transactional service-side queue.
If the underlying network fails or is simply unreliable, the message may never reach the service.
The service machine may crash due to software or hardware failures and will not be able to accept the message to its queue.
Even if the message is delivered successfully, the administrator (or any application, ...