All About Interop
Connecting .NET to just about anything else
Translate This Page
Translate this page
Email Blog Author
RSS for posts
RSS for comments
Search this blog
Search all blogs
Not Really Interop
.NET and MQSeries
All About Interop
.NET and MQSeries
.NET and MQSeries
8 Nov 2004 4:35 PM
IBM WebSphere MQ (previously known as "MQSeries") ships with a "postcard" app, amqpcard.exe, a simple demo that can be used to verify the installation of MQ. The postcard app is supplied without source code. At some point, IBM started shipping Java classes for MQ, and they also delivered a Java postcard app, including source code, to illustrate how you would connect to MQ from Java. The Java postcard app inter-communicates with the binary postcard app. I have produced a postcard app in C# that interoperates with both. It's
available in source form
, within a Visual Studio project.
MQ is .NET-enabled
In October 2003, IBM shipped the MQ Classes for .NET as part of CSD05 for MQSeries v5.3 on Windows. CSD 05 (and later) for MQ v5.3 on Windows now includes a .NET library, packaged as a single assembly, amqmdnet.dll. IBM calls this the "MQ Classes for .NET". The library exposes an set of classes in the IBM.WMQ namespace, things like MQMessage, MQQueue, MQQueueManager, and so on, that let any .NET app directly interact with MQ. The MQ installation on Windows can be a "server" or "client" installation - in MQ-speak, that means: with or without a local reliable store for messages. There is even documentation for this class library.
What can a .NET app do with MQSeries?
What can a .NET app do with MQ? Just about anything a Java app can do, or a VB6 app using the ActiveX control for MQ, or a C-app, using the MQ API. Put and send messages, inquire as to MQ QM properties (is it syncpoint enabled?, what version of MQ is the QM ?), do blocking or non-blocking calls, use multiple threads, participate in transactions, and so on. The postcard app I mentioned above, shows some of the above.
What about PCF?
Within the "MQ Classes for .NET", there is also a partial implementation of the PCF stuff. If you know MQ, you know what this means. PCF is the Programmable Control Facility, I think, and it is basically a way to send administrative commands to MQ Queue Managers, using the MQ infrastructure itself. PCF messages are specially formed at the sending end, and specially handled at the receiving end. IBM started creating a set of objects that aid in "doing PCF" with .NET, but as I said, it is a partial implementation, and is not documented as far as I am aware. PCF is documented, but the implementation of PCF within this class library is not.
The sample app I deliver here does not do PCF or exercise any of that PCF code.
Some Further Background on MQ
In IBM-speak, CSD stands for "Cumulative Service distribution", which means "fixpack". It's confusing because for some IBM software products, like DB2 UDB, IBM uses the actual term "fixpack". But for others, like MQ, IBM uses "CSD". Whatever.
Whether called CSD or fixpack, obviously there is a different series of fixes for each product.
The latest CSD for MQv5.3 on Windows is CSD08, released in October 2004. I think IBM recommends that you stay current with the CSDs. You don't need to upgrade your entire MQ network at the same time. You can upgrade your Windows server to CSD08 without touching your os390 system or AS400. Get the latest MQ CSDs
As with some other vendors, some fixpacks from IBM include new function. CSD05 for MQ v5.3 was one of those that shipped new function, specifically, the MQ Classes for .NET.
The History around the .NET support in MQ
A long, long time ago, I think it might have been spring or summer 2002, an MQ guru and all-around good guy named
quietly published a class library written in C# for interacting with MQSeries. This was, as I understand it, basically a conversion of the Java class library into C#, using the
Java Language Conversion Assistant
that Microsoft had released. The .NET Class library for MQ was one of those really cool things, but it was totally unsupported. Kind of a skunkworks project. An illustration. Apparently there was sufficient interest in getting "real" support for .NET in MQ that IBM made a formal effort, this time headed by the MQ lab in Hursley, to build the thing. They started with Kolban's work and made it real. This eventually was delivered as supportpac ma7p. A minor digression: Supportpac is a funny term. A supportpac is a package of complementary software -- sometimes utilities, sometimes just class libraries -- shipped by IBM. I have only heard of them related to MQSeries, so I don't think it is an IBM-general concept. Anyway, it's a funny term because in contrast to the name, "supportpacs" are generally NOT supported by IBM.
ma7p was released in February 2003, I believe. Again there was interest from the developer community, and so IBM "promoted" the .NET classes for MQ into a bonafide part of the product, complete with full support. This was initially released as part of CSD 05 for WMQ v.5.3, in October 2003.
Listen, if you google around on kolban.com, you can find the original MQSeries.NET package. Don't download that. That's the thing that is not supported. It's still available but you really should go to the supported IBM library - get it through CSD08.
Finally, a Disclaimer
I am not an employee of the IBM Company. I work for Microsoft. Anything I say about IBM or its products should be considered in that light. For authoritative information on MQ, go to IBM.
Blog - Comment List MSDN TechNet
Leave a Comment
Please add 2 and 5 and type the answer here:
An error occurred while posting! Please retry posting your comment.
© 2015 Microsoft Corporation.
Privacy & Cookies