Reliable Communication in WCF

Reliable Communication in WCF

DOI: 10.4018/978-1-5225-1997-3.ch009
OnDemand:
(Individual Chapters)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Chapter Preview

Top

Introduction

Reliable messaging is the mechanism to successfully deliver the message in case of failure of dependent components in service oriented applications. The failure can be due to network, transport failure or any other failure. In WCF reliable messing is provided by reliable sessions using WS-reliable messaging protocol. When you send any message you make sure that it is reached to the destination. If it is not reached you may send it again to guarantee the delivery of the message. This mechanism is adopted by TCP and name pipes, but HTTP does have this mechanism. For TCP and named pipe communication guarantee of message delivery is only from point-point. If other components such as a proxy server or router exist, then it is difficult to get the message delivery assurance. Now reliable sessions in WCF provide following advantages:

  • End-to-end message delivery is guaranteed.

  • The entire message is delivered not just packet of messages are delivered.

  • There is no chance of duplication of message i.e. a message is sent exactly once.

  • The reliable messaging protocol works on all types of binding so reliable delivery of message possible in HTTP protocol also.

  • The reliable messaging protocol is interoperable so guarantee of message delivery is possible between diverse machines and diverse platforms. For example, because of this protocol a message is surely delivered between WCF service and JAVA program running on Linux.

In the following section, reliable sessions are explained in depth. For durable transfer message queuing is used which is discussed after the section of reliable sessions.

Top

Working With Reliable Sessions

To enable reliable messaging in WCF, you must use binding which supports reliable messaging. The bindings such as wsHttpBinding, netTcpBinding, wsDualHttpBinding etc support the reliable messaging. The reliable messaging can be enabled by adding new binding configuration and relating that binding configuration to the endpoint as illustrated in the code snippet of configuration file in Example 1.

Complete Chapter List

Search this Book:
Reset