Connecting to a queue manager using the MQCONNX call
The MQCONNX call is similar to the MQCONN call, but includes options to control the way that the call works.
As input to MQCONNX, you can supply a queue manager name
, or a queue sharing
group name on z/OS® shared queue systems. The
options to control how the connection is made to the queue manager are supplied in a structure
called the MQCNO.
The output from MQCONNX is:
- A connection handle (Hconn)
- A completion code
- A reason code
The connect options, set in the
Options field of the MQCNO
structure, allows several attributes of the connection to be controlled. Of particular note are the
following groups of options:- The binding options allow trusted applications to be created. Trusted applications imply that the IBM® MQ application and the local queue manager agent become the same process. Because the agent process no longer needs to use an interface to access the queue manager, these applications become an extension of the queue manager. This behavior is requested by specifying the MQCNO_FASTPATH_BINDING option. For more information about the restrictions that apply to trusted applications, see Restrictions for trusted applications.
- The handle-sharing options allow shared connections to be created. Shared connections can share handles between different threads within the same process. For more information about shared connections, see Shared (thread independent) connections with MQCONNX.
The MQCNO also allows the application to control how the connection to the queue manager is authenticated. Authentication credentials can be specified in an MQCSP structure that is referenced from the MQCNO structure.
For a full description of the parameters to the MQCONNX call, and the connection attributes that can be controlled, see MQCONNX - Connect queue manager (extended).