Accessing IBM MQ from Java - Choice of API
IBM® MQ provides three Java language interfaces.
- IBM MQ classes for Jakarta Messaging
- IBM MQ classes for JMS
- IBM MQ classes for Java
IBM MQ classes for Jakarta Messaging
IBM MQ classes for Jakarta Messaging allows applications written using the Jakarta Messaging 3.0 APIs to utilise IBM MQ as a messaging provider.
Jakarta Messaging is the strategic direction for messaging in Java applications.
Jakarta Messaging 3.0 is functionally equivalent to JMS 2.0, so for more information see Using IBM MQ classes for JMS/Jakarta Messaging.
IBM MQ classes for JMS
IBM MQ classes for JMS allows applications written using the JMS 2.0 APIs to utilise IBM MQ as a messaging provider.
As Jakarta Messaging supersedes JMS, IBM MQ classes for JMS is recommended for use in existing applications or in environments (for example, WebSphere® Application Server) that do not support Jakarta Messaging.
It is not supported to use both IBM MQ classes for Jakarta Messaging and IBM MQ classes for JMS in the same application.
For more information see Using IBM MQ classes for JMS/Jakarta Messaging.
IBM MQ classes for Java
The other API that Java applications can use to
access IBM MQ resources is IBM MQ classes for Java, which provides an IBM MQ-oriented API for programs to use IBM MQ as a messaging provider. However, IBM MQ classes for Java is functionally stabilized at the
level shipped in IBM MQ 8.0. For more information, see
Why should I use IBM MQ classes for Java?. Although existing applications that use IBM MQ classes for Java continue to be fully supported, new applications
should use IBM MQ classes for Jakarta Messaging.
Common features of IBM MQ classes for JMS and IBM MQ classes for Jakarta Messaging
IBM MQ classes for JMS and IBM MQ classes for Jakarta Messaging provide access to both the point-to-point and publish/subscribe messaging features of IBM MQ. As well as sending JMS messages that provide support for the JMS standard messaging model, applications can also send and receive messages without additional headers and so can inter-operate with other IBM MQ applications, for example, C MQI applications. Full control of the MQMD and MQ message payloads is available.
Further IBM MQ features such as message streaming, asynchronous put and report messages are also available.
Using the supplied PCF helper classes, IBM MQ PCF administration messages can be sent and received through the JMS API and can be used to administer queue managers.
Features that have recently been added to IBM MQ, such as asynchronous consume and automatic reconnection, are not available in the IBM MQ classes for Java, but are available in the IBM MQ classes for JMS and IBM MQ classes for Jakarta Messaging.
Requesting enhancements
If you need access to IBM MQ features that are not available through IBM MQ classes for JMS and IBM MQ classes for Jakarta Messaging, you can raise an idea.
IBM can then advise whether the implementation is possible in the IBM MQ classes for JMS or IBM MQ classes for Jakarta Messaging implementation, or whether there is a best practice that can be followed.
For additional messaging features, as IBM is a contributor to the open standard, these features can be raised as part of the JCP process. These would only apply to Jakarta Messaging.