MsmqIntegrationBinding Vs NetMsmqBinding

.net, wcf

Solution

They're pretty different bindings (even if they share a large implementation base in `MsmqBindingBase`) and `NetMsmqBinding` can be used only with other .NET WCF clients. `MsmqIntegrationBinding` is intended to be used when your application must interop with older applications (in any language) that use MSMQ for communication, from MSDN:

This binding [MsmqIntegrationBinding] can be used to enable WCF applications to send and receive messages to and from existing MSMQ applications that use COM, native C++ APIs or the types defined in the System.Messaging namespace.

Most evident differences between these bindings can be summarized in what `MsmqIntegrationBinding` lacks of:

- Security support is pretty trivial (what about security channels?).

- Contracts interface is more limited (because it must interop with non .NET applications).

- Syntax for addresses is different from other WCF bindings (take a look to `EndpointAddress` in the examples in MSDN).

- You can't use all the messages' features (encoding, for example).

For more details about this take a look to this blog post about MsmqIntegrationBinding in WCF.

Then when to use them? I think any new WCF application should always use the `NetMsmqBinding`, keeping `MsmqIntegrationBinding` only for compatibility with existing applications. From MSDN:

The NetMsmqBinding binding provides support for queuing by using Message Queuing (MSMQ) as a transport and enables support for loosely-coupled applications, failure isolation, load leveling and disconnected operations.

Problem

I know we can use the above bindings for MSMQ Applications. Is this consumable by other clients(Apart from .net) also ? What is the difference...? Some real time examples ll help me. Thanks

Original source