Deciding which programming language to use

Use this information to find out about programming languages and frameworks supported by IBM® WebSphere® MQ, and some considerations for using them.

IBM WebSphere MQ provides support for the following programming procedural languages:
  • C
  • Visual Basic (Windows systems only)
  • COBOL

These languages use the message queue interface (MQI) to access message queueing services. For more information about support for these languages see, Using procedural languages with WebSphere MQ.

IBM WebSphere MQ provides support for:
  • .NET
  • ActiveX
  • C++
  • Java
  • JMS
These languages use the IBM WebSphere MQ Object Model, which provides classes that provide the same functionality as WebSphere MQ calls and structures, but that are a more natural way of programming in an object-oriented environment. Some of the languages that use the IBM WebSphere MQ Object Model provide additional functions that are not available in the message queue interface (MQI). For more information about support for these languages see, Object-oriented programming with WebSphere MQ.

Using procedural languages with WebSphere MQ

For detailed information about how to write your applications in your chosen language, see the following links:

For an overview of the call interface for procedural languages, see Call descriptions. This topic contains a list of the MQI calls, and each call shows you how to code the calls in each of these languages.

WebSphere MQ provides data definition files to help you to write your applications. For a full description, see IBM WebSphere MQ data definition files.

If you can choose which language to code your programs in, consider the maximum length of the messages that your programs will process. If your programs will process only messages of a known maximum length, you can code them in any of the supported programming languages. But if you do not know the maximum length of the messages that the programs will have to process, the language you choose will depend on whether you are writing a CICS®, IMS, or batch application:
IMS and batch
Code the programs in C, PL/I, or assembler language to use the facilities these languages offer for obtaining and releasing arbitrary amounts of memory. Alternatively, you could code your programs in COBOL, but use assembler language, PL/I, or C subroutines to get and release storage.
CICS
Code the programs in any language supported by CICS. The EXEC CICS interface provides the calls for managing memory, if necessary.

Object-oriented programming with WebSphere MQ

Some of the languages and programming frameworks that use the IBM WebSphere MQ Object Model provide additional functions that are not available in the message queue interface (MQI). For details of the classes, methods and properties provided by the IBM WebSphere MQ Object Model, see The IBM WebSphere MQ Object Model.
.NET
See Using .NET for information about coding .NET programs using the WebSphere MQ .NET classes. Message Service Clients for C/C++ and .NET provide an application programming Interface (API) called XMS that has the same set of interfaces as the Java Message Service (JMS) API.
C++
IBM WebSphere MQ provides C++ classes equivalent to WebSphere MQ objects and some additional classes equivalent to the array data types. It provides a number of features not available through the MQI. See Using C++ for information about coding programs using the WebSphere MQ Object Model in C++. Message Service Clients for C/C++ and .NET provide an application programming Interface (API) called XMS that has the same set of interfaces as the Java Message Service (JMS) API.
Java
See Using Java for information about coding programs using the WebSphere MQ Object Model in Java. For information about the differences between IBM WebSphere MQ classes for Java and IBM WebSphere MQ classes to help you decide which to use, see Should I use IBM WebSphere MQ classes for Java or IBM WebSphere MQ classes for JMS?.
JMS
Websphere MQ also provides classes that implement the Java Message Service (JMS) specification. For details of the Websphere MQ classes for JMS, see Using Java. For information about the differences between IBM WebSphere MQ classes for Java and IBM WebSphere MQ classes to help you decide which to use, see Should I use IBM WebSphere MQ classes for Java or IBM WebSphere MQ classes for JMS?.

Message Service Clients for C/C++ and .NET provide an application programming Interface (API) called XMS that has the same set of interfaces as the Java Message Service (JMS) API.

ActiveX
The WebSphere MQ ActiveX is commonly known as the MQAX. The MQAX is included as part of WebSphere MQ for Windows.Support for ActiveX has been stabilized at the WebSphere MQ Version 6.0 level. To exploit features introduced to WebSphere MQ later than Version 6.0, consider using .NET instead. Refer to Using the Component Object Model Interface (WebSphere MQ Automation Classes for ActiveX) for information about coding programs using the WebSphere MQ Object Model in ActiveX.