I'm working with IBM MQ Java classes and trying to understand how MQQueueManager handles TCP/IP connections under the hood.
For example:
MQQueueManager mgr = new MQQueueManager(qMgrName);
My questions are:
Does every new
MQQueueManagerinstance create a brand-new TCP/IP socket connection to the queue manager?If multiple threads or requests repeatedly create and close
MQQueueManagerobjects, does that mean a new network connection handshake happens every time?Is there any built-in connection reuse or pooling mechanism in the IBM MQ Java client libraries?
What is the recommended approach for high-throughput or low-latency applications where creating connections repeatedly could become expensive?
Current scenario:
Java application using IBM MQ client mode
Many short-lived operations (put/get)
Potentially high concurrency
Concerned about connection overhead and resource usage on both client and queue manager side
I'm looking for best practices around:
Reusing
MQQueueManagerinstancesThread safety considerations
Connection pooling options
JMS vs base MQ classes for pooling support
Whether application servers (Spring, WebSphere, etc.) handle this differently
Any clarification on how IBM MQ manages underlying TCP connections and recommended patterns for efficient reuse would be appreciated.