I am trying to connect to an existing JMS queue with a .NET client. I know the queue is working, I already browsed it using IBM MQ Explorer.
In the following code, the call to factory.CreateConnection keeps hanging - it does not jump to the next line, in does not show any error message. It even doesnt consume any CPU.
Are there any options that I should try to get it working (or at least make it show me an error message of any kind)?
private static IConnectionFactory GetConnectionFactory()
{
var factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
var cf = factoryFactory.CreateConnectionFactory();
cf.SetStringProperty(XMSC.WMQ_HOST_NAME, "server address");
cf.SetIntProperty(XMSC.WMQ_PORT, portnumber);
cf.SetStringProperty(XMSC.WMQ_CHANNEL, "channelname");
cf.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT);
cf.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "queuemanager");
cf.SetIntProperty(XMSC.WMQ_BROKER_VERSION, XMSC.WMQ_BROKER_UNSPECIFIED);
return (cf);
}
The main method has the following:
var factory = GetConnectionFactory();
var connection = factory.CreateConnection("username", null);