0
votes

I need to configuration connection with MQ, to receive messages. Tried to use this example: https://github.com/ibm-messaging/mq-mqi-nodejs/blob/85f216027b02b959be586d6f8fca9f242df485e0/samples/amqsgeta.js

But, I do not fully understand. Where I need to put parameters: Host, port, MQ Queue Manager Name, MQ Queue Name. When I put my parameters it doesn`t work. I see error ibm mq error 2538 Could you show an example? I use ubuntu.

2
I think you would use a CCDT for this.JoshMc

2 Answers

3
votes

Understanding is that you are running your program from a box other than where the MQ server(and Queue manager) is running. You have to set the MQ environment before connecting the queue manager. The sample in the github location is in the link => https://github.com/ibm-messaging/mq-mqi-nodejs/blob/master/samples/amqsconn.js

You'll have to populate the below parameters mentioned in the program to connect to Queue manager :

         var qMgr = "QM1";  //Queue manager name

         csp.UserId = "mqguest";    //Username & password configured by your MQ admin
         csp.Password = "passw0rd";

         cd.ConnectionName = "localhost(1414)";    //host & port
         cd.ChannelName = "SYSTEM.DEF.SVRCONN";    //Client channel name to connect to MQ sever
0
votes

Look at the amqsconn and amqconntls samples in the same directory.