I'm having 70-513 exam soon. There is a question in the dump that i don't understand.
A WCF service implements a contract with one-way and request-reply operations. The service is exposed over a TCP transport. Client use a router to communicate with the service.
The answer said using IDuplexSessionRouter instead of IRequestReplyRouter. Can i know why cannot use IRequestReplyRouter??
That question is covered in this msdn article: Building a router (look for "Routers and Transport Sessions" section there)
The Routing Service uses contracts that define the shape of the channels used to receive and send messages, and therefore the shape of the input channel must match that of the output channel.
So if you perform routing to endpoints that use the request-reply channel shape, then you must use a compatible contract on the inbound endpoints, such as the IRequestReplyRouter.
This means that if your destination endpoints use contracts with multiple communication patterns (such as mixing one-way and two-way operations) you cannot create a single service endpoint that can receive and route messages to all of them. A workaround is to use a duplex contract at the Routing Service such as IDuplexSessionRouter.
References:
http://msdn.microsoft.com/en-us/magazine/cc546553.aspx
http://msdn.microsoft.com/en-us/library/ee517422.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With