Sharpeye500
Sharpeye500

Reputation: 9063

Accessing remote MQ server from MQ.NET

How do i access the remote server of queue manager from my MQ.NET?

i.e. If the queue manager is IBM MQ 7x, i would like to enable auto reconnect, if not no auto reconnect. Like, is there any attribute to find the version # of MQ installed in the remote server?

if remote queue manager of remote server is 7x

var mqQMgr = new MQQueueManager("My queue Manager", MQC.MQCNO_RECONNECT_Q_MGR, "my channel name", "my connection name");

else

var mqQMgr = new MQQueueManager("My queue Manager", "my channel name", "my connection name");

Upvotes: 0

Views: 1059

Answers (1)

Paul H
Paul H

Reputation: 2114

I don't believe it is possible to determine the version of the queue manager until after you've made the connection. A couple of options would be:

  1. Have a parameter that the user sets to specify the version of MQ and if the version is greater than or equal to 7 include the MQC.MQCNO_RECONNECT_Q_MGR option.
  2. Connect to the queue manager as though it were running an earlier version of MQ, determine the version of the queue manager using mqQMgr.getCommandLevel() and then if it is greater or equal to 700 disconnect and reconnect to the queue manager with the MQC.MQCNO_RECONNECT_Q_MGR option.

Upvotes: 1

Related Questions