在 IBM MQ WebSphere (amqmdnet.dll) 的 .NET 库中应使用哪个命名空间(IBM.WMQ 与 IBM.WMQAX)

Which namespace (IBM.WMQ vs. IBM.WMQAX) should be used in the .NET library for IBM MQ WebSphere (amqmdnet.dll)

我正在编写一个从 IBM WebSphere MQ 获取数据的应用程序。 IBM 提供了一个带有 类 的 DLL 来与 MQ 交互。但是,似乎有两个主要名称空间; IBM.WMQ 和 IBM.WMQ 斧头。后者似乎是较新的补充,但前者似乎是各种网站上模糊的答案建议用于 .NET 应用程序的内容。我希望这里有人能够列举出真正的区别以及每个命名空间中 advantages/disadvantages 和 类 提供的内容。

来自this thread

The IBM.WMQ is IBM's version of Neil Kolban's original work of converting the Java classes for MQ to classes for the .NET framework.

The IBM.WMQAX is IBM's COM component for accessing MQ (ActiveX)

If you're coding in .NET, use IBM.WMQ since it's managed code. If you're coding in VB6 or VC++ then use the ActiveX com component.

You could use the COM component from .NET using COM Interop, but that really would only make sense, IF, the classes for .NET were NOT available. Seeing that they are, use IBM.WMQ.

This thread,@stuartd 在答案中的链接包含一些有价值的信息。虽然他引用的部分似乎部分不正确,但线程中的其他评论可以更好地澄清问题。虽然我从未使用过 VB 脚本或 ActiveX,因此不太了解 IBM.WMQAX 命名空间想要解决的问题,但我可以从讨论中确定在编写从头开始新的 .NET 应用程序。

您需要使用 IBM.WMQ 命名空间来开发 .NET 应用程序以与 IBM MQ 队列管理器交互。另一个 IBM.WMQAX 命名空间用于 ActiveX 应用程序。