I am using "AMQPNetLite.Core" to connect to the IBM MQ server.
However, when I try to new the connection there is an OperationCanceledException thrown.
Address address = new Address($"amqp://{hostName}:{port}");
// System.OperationCanceledException: 'The transport 'TcpTransport' is closed.'
Connection connection = new Connection(address, SaslProfile.Anonymous, null, null);
Session session = new Session(connection);
The log in IBM MQ server shows:
The data received from host 'xxx.xxx.xxx.xxx' on channel '????' is not valid. [CommentInsert1(xxx.xxx.xxx.xxx), CommentInsert2(TCP/IP), CommentInsert3(????)]
The TCP/IP responder program encountered an error. [CommentInsert1(TCP/IP), CommentInsert3(xxx.xxx.xxx.xxx)]
The channel is "????" in the log, does it mean I need to specify a channel before I instantiate a connection? But where can I do so? There seems no place at the Address and Connection classes to specify the channel name.
The server should be working, because I can send and receive message by the "IBMMQDotnetClient"
MQEnvironment.Hostname = hostName;
MQEnvironment.Channel = channel;
MQQueueManager queueManager = new MQQueueManager(queueManagerName);
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT;
MQQueue system_default_local_queue = queueManager.AccessQueue(queueName, openOptions);
// Send and Receive message via the queue