简体   繁体   English

MsmqIntegrationBinding与NetMsmqBinding相对应

[英]MsmqIntegrationBinding Vs NetMsmqBinding

I know we can use the above bindings for MSMQ Applications. 我知道我们可以将上述绑定用于MSMQ应用程序。

Is this consumable by other clients(Apart from .net) also ? 这可以被其他客户消费(除了.net)吗?

What is the difference...? 有什么不同...? Some real time examples ll help me. 一些实时例子会帮助我。

Thanks 谢谢

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. 它们是非常不同的绑定(即使它们在MsmqBindingBase共享一个大的实现基础), NetMsmqBinding只能与其他.NET WCF客户端一起使用。 MsmqIntegrationBinding is intended to be used when your application must interop with older applications (in any language) that use MSMQ for communication, from MSDN: MsmqIntegrationBinding旨在当您的应用程序必须与使用MSMQ进行通信的旧应用程序(使用任何语言)互操作时使用,来自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. 此绑定[MsmqIntegrationBinding]可用于使WCF应用程序能够发送和接收使用COM,本机C ++ API或System.Messaging命名空间中定义的类型的现有MSMQ应用程序的消息。

Most evident differences between these bindings can be summarized in what MsmqIntegrationBinding lacks of: 这些绑定之间最明显的差异可以归结为MsmqIntegrationBinding缺少的:

  • Security support is pretty trivial (what about security channels?). 安全支持非常简单(安全通道怎么样?)。
  • Contracts interface is more limited (because it must interop with non .NET applications). Contracts接口更受限制(因为它必须与非.NET应用程序互操作)。
  • Syntax for addresses is different from other WCF bindings (take a look to EndpointAddress in the examples in MSDN). 地址语法与其他WCF绑定不同(请参阅MSDN中示例中的EndpointAddress )。
  • 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 . 有关这方面的更多详细信息,请查看有关WCF中MsmqIntegrationBinding的博客文章。

Then when to use them? 那么什么时候使用它们? I think any new WCF application should always use the NetMsmqBinding , keeping MsmqIntegrationBinding only for compatibility with existing applications. 我认为任何新的WCF应用程序都应该始终使用NetMsmqBinding ,只保留MsmqIntegrationBinding以与现有应用程序兼容。 From MSDN: 来自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. NetMsmqBinding绑定通过使用消息队列(MSMQ)作为传输提供对排队的支持,并支持松散耦合的应用程序,故障隔离,负载均衡和断开连接的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM