Share via


[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

https://msdn.microsoft.com/en-us/library/ms789008.aspx

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”

WCFMSMQSln.zip

Comments

  • Anonymous
    March 05, 2009
    PingBack from http://www.anith.com/?p=16110

  • Anonymous
    March 06, 2009
    Steven Chen, one of my colleagues over in Shanghai, has posted about his simple sample " which demonstrates