[WCF]Exposing WCF service to raw MSMQ client via msmqIntegrationBinding

[WCF]Exposing WCF service to raw MSMQ client via msmqIntegrationBinding


WCF has provided two built-in bindings to help work with MSMQ. NetMsmqBinding and MsmqIntegrationBinding. NetMsmqBinding is good for client & services which are both built upon .NET 3.5 WCF component. While MsmqIntegrationBinding is good for communication between raw MSMQ and .NET WCF.


There is already a good example on how to communication with MSMQ based application(server) from a WCF based client.


#How to: Exchange Messages with WCF Endpoints and Message Queuing Applications



Here I’ve created a simple sample which demonstrate how to use raw MSMQ client(based on System.Messaging component) to communicate with WCF msmqIntegrationBinding based service. The solution consists of 4 projects:


l  ClassLib that contains shared ServiceContract and DataContract definition

l  WCF ServiceApp which contains the service host using msmqIntegrationBinding

l  WCF clientApp which use WCF code to consume the service

l  Raw MSMQ ClientApp which use System.Messaging component to consume the service


All the WCF code use programmatic approach instead of app.config to configure the service and client endpoints. Solution attached in “WCFMSMQSln.zip”




Comments (2)

  1. Steven Chen, one of my colleagues over in Shanghai, has posted about his simple sample " which demonstrates