+

Search Tips | Advanced Search

Developing .NET applications

IBM MQ classes for .NET allow a program written in the .NET programming framework to connect to IBM MQ as an IBM MQ MQI client or to connect directly to an IBM MQ server.

If we have applications which use Microsoft .NET Framework and want to take advantage of the facilities of IBM MQ, we must use IBM MQ classes for .NET. For more information, see Installing IBM MQ classes for .NET Framework.

From Version 9.1.1, IBM MQ supports .NET Core for applications in Windows environments. For more information, see Installing IBM MQ classes for .NET Standard.

From Version 9.1.2, IBM MQ supports .NET Core for applications in Linux environments.

From Version 9.1.4, IBM MQ .NET managed applications are able to automatically balance connections across clustered queue managers. Both the .NET Framework and .NET Standard libraries are supported. For more information, see About uniform clusters and Automatic application balancing.

The object-oriented IBM MQ .NET interface is different from the MQI interface in that it uses methods of objects rather than using the MQI verbs.

The procedural IBM MQ application programming interface is built around verbs such as those in the following list:
       MQCONN, MQDISC, MQOPEN, MQCLOSE, 
       MQINQ, MQSET, MQGET, MQPUT, MQSUB  

These verbs all take, as a parameter, a handle to the IBM MQ object on which they are to operate. Because .NET is object-oriented, the .NET programming interface turns this round. Your program consists of a set of IBM MQ objects, which you act upon by calling methods on those objects. We can write programs in any language supported by .NET.

When we use the procedural interface, you disconnect from a queue manager by using the call MQDISC( Hconn, CompCode, Reason), where Hconn is a handle to the queue manager.

In the .NET interface, the queue manager is represented by an object of class MQQueueManager. You disconnect from the queue manager by calling the Disconnect() method on that class.
// declare an object of type queue manager
MQQueueManager queueManager=new MQQueueManager();
...
// do something...
...
// disconnect from the queue manager
queueManager.Disconnect();

IBM MQ classes for .NET is a set of classes that enable .NET applications to interact with IBM MQ. They represent the various components of IBM MQ which the application uses, such as queue managers, queues, channels and messages. For details of these classes, see The IBM MQ .NET classes and interfaces.

Before we can compile any applications that you write, we must have a .NET Framework installed. For instructions on installing the IBM MQ classes for .NET and the .NET Framework, see Installing IBM MQ classes for .NET Framework.


Related concepts


Related information

Last updated: 2020-10-04