Linked Questions

Popular Questions

i would like to connect to mqseries server having this info

  1. the queue 's name :"myqueue"
  2. connection name:"myconnectionName"
  3. client channel :"mychannel"
  4. server name:"myServerName"

    do i also need to know the queuemanager? or can i use "default" and i am also getting this error message

Unable to load DLL 'mqic32.dll' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)'

        static MQQueueManager queueManager;
        static MQQueueManager qManager;
        static MQQueue queue;
        MQMessage queueMessage;
        MQGetMessageOptions queueGetMessageOptions;
        MQPutMessageOptions queuePutMessageOptions;
        static string QueueName;
        static void Main(string[] args)
         static void Connect()
            var builder = new ConfigurationBuilder()
                .AddJsonFile("AppSettings.json", true, true).Build();

            // Read the Mqseries "connection string" from App.config file.
            var queueManagerName = builder["queueManagerName"];
            var MQChannel = builder["MQChannel"];
            var  queueName = builder["QueueName"];
            string connectionName = builder["ConnectionName"];
            MQAccess(queueName, "Default", connectionName, MQChannel);
            Console.WriteLine("Connected to MQ Queue Manager");
        public static void MQAccess(string queueName, string queueManager, string connection, string channel)
            QueueName = queueName;

            qManager = new MQQueueManager(queueManager, channel, connection);

            queue = qManager.AccessQueue(QueueName, MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING);

Related Questions