Lawrence Tierney
Lawrence Tierney

Reputation: 898

Java, IBM MQ, getting correct client JARs?

I have a Spring Boot app (1.5.2) that I need to act as a (JMS) client to an IBM MQ (7.0.1.2) instance; in order to read messages from Queues.

I am struggling to determine which JARs I need and where I can source them from.

I have reviewed the IBM website and various other sources but have found them somewhat contradictory.

Questions:

  1. What JARs do I need?
  2. com.ibm.mq.allclient? Does this work with version 7.0?
  3. Where and how do I get the JARs?

Note: I have JMS up and running "locally" with no problems using ActiveMQ.

Thanks in advance

Upvotes: 3

Views: 8228

Answers (3)

john k
john k

Reputation: 6615

According to here: https://www.ibm.com/support/pages/supported-way-install-websphere-mq-java-jar-files-jms-jar-files-or-cc-libraries

For MQ7:

The only supported way to get the MQ jar files or the MQ C/C++ library files onto a system is to install either:

  • the WebSphere MQ product or
  • the WebSphere MQ Client SupportPacs.

So you cannot download the .jar files.

Allclient.jar is only for MQ8 and later.

Upvotes: 0

a_cornish_pasty
a_cornish_pasty

Reputation: 816

Answer 1: See the following page in the Knowledge Center that describes how to configure the Java classpath for applications that use the MQ classes for JMS:

https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q031560_.htm

The com.ibm.mqjms.jar will pull in the other required from the MQ client installation. So don't copy the jars file around, just reference the one from the installation as documented. If you must copy and/or embed the MQ Java client into an application bundle, use the "MQ Redistributable Client" only. Linked from the client download page (see Answer 3).

As an alternative to the com.ibm.mqjms.jar file, you can use the com.ibm.mq.allclient.jar which includes both the MQ classes for JMS and MQ classes for Java clients.

Answer 2: Later versioned clients can connect to back-level queue managers. So you can use the latest MQ V9 client to connect to your MQ V7.0.1 queue managers. Be aware MQ v7.0.1.2 was released in May 2010 and is very, very old. You should have a plan in place to migrate to a later (and supported) version of MQ.

Answer 3: https://www-01.ibm.com/software/integration/wmq/clients/

MQ V9 client, page here: http://www-01.ibm.com/support/docview.wss?uid=swg24042176

Upvotes: 2

Tim McCormick
Tim McCormick

Reputation: 956

1) It depends on the version, but from V8 onwards com.ibm.mq.allclient is the easiest one to use.

2) All versions of MQ client are forward and backward compatible with all versions of MQ queue manager. 7.0 went out of support (and so no longer receives security fixes) back in 2015. 7.5 is the oldest in support version, but I'd recommend going to MQ 9 LTS for your client.

3) The MQC support pack is the easiest way:
MQC75 (7.5) http://www-01.ibm.com/support/docview.wss?uid=swg24032744
MQC8 (8.0) http://www-01.ibm.com/support/docview.wss?uid=swg24037500
MQC9 (9.0) http://www-01.ibm.com/support/docview.wss?uid=swg24042176

Be prepared for this not to 'just work' based on your experience with ActiveMQ. ActiveMQ is a totally different JMS implementation to IBM MQ, and unfortunately the JMS specification is loose enough that migration between providers isn't always seamless.

Upvotes: 4

Related Questions