MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

  • 1.  How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Thu August 17, 2023 11:30 AM

    The MQQueueManager class is currently preventing connections to distinct queue managers on various hosts while a request is underway. An error arises when a request is made to create a new instance of the queue manager during this ongoing process.
    For below line of code in .NET when a request is sent to for creating a new instance of queue manager while 1 request is already in process, am getting MQRC_NOT_AUTHORIZED error
    MQQueueManager qmgr = new QueueManager("<QMGR>", "<properties>")

    can anyone help on how can i use the same QueueManager class to create multiple instances in parallel and one request processing shouldn't effect the other request?



    ------------------------------
    Lakshman Ramavath
    ------------------------------


  • 2.  RE: How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Fri August 18, 2023 12:49 AM

    Can you confirm that the QueueManager class is successful when the requests are not made in parallel?

    Can you please show what the AMQERR01.LOG in the qmgr directory shows the error is when the QueueManager class call fails.

    Cheers,
    Morag



    ------------------------------
    Morag Hughson
    MQ Technical Education Specialist
    MQGem Software Limited
    Website: https://www.mqgem.com
    ------------------------------



  • 3.  RE: How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Fri August 18, 2023 01:52 AM
    Edited by Lakshman Ramavath Fri August 18, 2023 02:23 AM

    Hi, Thanks for looking into this.
    Yes QueueManager class is working fine when there are no requests in parallel.
    same request which is working alone fails when there is a request already in process.

    and there are no errors noticed in the AMQERR01.LOG in the server where MQ is installed.



    ------------------------------
    Lakshman Ramavath
    ------------------------------



  • 4.  RE: How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Mon August 21, 2023 12:59 AM

    You did not specify the type of connection you are having to the queue manager. If your connection is in bindings mode, then you are only allowed 1 connection to the queue manager and you have to share the handle. If your connection is in TCP Client mode, you should be able to create the number of connections that you need, providing you do not exceed the max channels clause. Hope this helps



    ------------------------------
    Francois Brandelik
    ------------------------------



  • 5.  RE: How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Tue August 22, 2023 12:31 AM
    Edited by Lakshman Ramavath Tue August 22, 2023 12:31 AM

    I specified the connection as client mode.

    Hashtable properties = new Hashtable();
    properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
    MQQueueManager qMgr= new MQQueueManager(queueManagerName, properties);

    If i keep the connection open and read 100's of queue information one by one, another request received is failing as MQRC not Authorized at the time of creating new instance of QueueManager.



    ------------------------------
    Lakshman Ramavath
    ------------------------------



  • 6.  RE: How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Fri August 25, 2023 03:32 AM
    Edited by Lakshman Ramavath Fri August 25, 2023 03:33 AM

    The .NET code in the server where this is running has 9.1.0 client also installed. Does it have any limitation that the client connects to only one queue manager at a time and can't connect to other queue manager which is in entirely different host and which uses different certificate untill i close first connection session?

    Anyone who has an idea on this, Kindly help me find out the issue?



    ------------------------------
    Lakshman Ramavath
    ------------------------------



  • 7.  RE: How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Thu August 31, 2023 07:49 AM
    Edited by bruce2359 Thu August 31, 2023 10:53 PM

    If you application is client-bindings, look for errors on the error log on the client platform, too.

    I'm a bit confused here.  Which is the correct reading of your original post (OP)?

    • you have an application that is attempting to connect to different qmgrs concurrently, OR
    • you have an application that is attempting to connect to the same qmgr multiple times OR
    • something else



    ------------------------------
    bruce lerner
    CTTECH Computer & Telecommunications Technology
    West Coast, almost
    000-000-0000
    ------------------------------



  • 8.  RE: How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Fri September 01, 2023 03:45 AM

    Hi @bruce2359, Issue is as below.

    I have an application that is attempting to connect to different qmgrs concurrently and failing.



    ------------------------------
    Lakshman Ramavath
    ------------------------------



  • 9.  RE: How can i create multiple instances of QueueManager at the same time where 9.1.0.10 client is installed in the server

    Posted Fri September 01, 2023 11:37 AM
    Edited by bruce2359 Fri September 01, 2023 02:29 PM
    Generally, apps do not concurrently connect to multiple qmgrs in the same unit-of-work.  
    You mentioned certificates:  "... and can't connect to other queue manager which is in entirely different host and which uses different certificate untill i close first connection session?"
    I presume you mean TLS certificate.  
    Distributed transactions in .NET says:  "IBM MQ is used as the resource manager. Note that you cannot use TLS with XA transactions. You must use CCDT. For more information, see Using the extended transactional client with TLS channels."
     
    I asked earlier in this thread for you to look for errors on the client platform AMQERR01.LOG file. What did you find?