Message Exchange Patterns in WCF

 

WCF is basically used for message transfer. There three different types of Message Exchange patterns in WCF and Those are One Way Message Exchange Pattern, Request/Reply Message Exchange Pattern and Duplex Message Exchange Pattern.

 

One Way Message Exchange Pattern: In this Message Exchange Pattern Client sends the message to the server and server will not send any response to client. 

In this Message Exchange Pattern, client will send the message and does not bother about server response.

 

                                          

 

One Way Message Exchange Pattern is very fast communication pattern. In this Message Exchange Pattern client does not require any response, but it receives confirmation whether message is sent or not and it is not the server response. 

Request/Reply Message Exchange Pattern: In this Message Exchange Pattern, client sends the message and server receives the message and will send response to client.

 

                                      

 

Request/Reply Message Exchange Pattern is most commonly used Message Exchange Pattern in C#. 

Duplex Message Exchange Pattern: In this Message Exchange Pattern Sender and Receiver can exchange multiple messages as shown below.

                                  

Duplex Message Exchange Pattern is richest/highest Pattern of WCF. Sender can become Receiver and Receiver can become the Sender in the case of Duplex Message Exchange Pattern. In this Message Exchange Pattern there is no client and there is no server specifically.