I am using MQ Java PCF API to retrieve information from an MQ installation.
There are several constructors for the class PCFMessageAgent
.
There is one that accepts the host
, port
and channel
name. I have shown an extract from the documentation.
public PCFMessageAgent(String host,
int port,
String channel)
throws MQException
Initializes a new PCFMessageAgent with a client connection to a queue manager.
My question is which queue manager will this connect to?
Is it the default queue manager?
How do I specify the queue manager i want to connect to?
No need to specify queue manager, as soon as you specify host and port. You will connect to the one listening to that port.
Update, from IBM docs:
A server connection channel is a bidirectional MQI channel that is used to connect a IBM WebSphere MQ client to a IBM WebSphere MQ server. The server connection channel is the server end of the channel.
A client connection channel is a bidirectional MQI channel that is used to connect a IBM WebSphere MQ client to a IBM WebSphere MQ server. IBM WebSphere MQ Explorer also uses client connections to connect to remote queue managers. The client connection channel is the client end of the channel. When you create a client-connection channel, a file is created on the computer that hosts the queue manager. You must then, copy the client-connection file to the IBM WebSphere MQ Client computer.
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.explorer.doc/e_channels.htm