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

Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

  • 1.  Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Tue July 11, 2023 06:33 AM

    I have a multi instance setup running on Linux.

    I would to set up the MQ REST API to be able to do remote calls to the 2nd / Secondary QMGR.

    I know you can set it up for Remote QMGRS, but there seems to be a problem with multi instance QMGRS.

    here is the error: 

    MQWB0004E: An internal error occurred while communicating with the queue manager. The root MQ reason code was 2543 : MQRC_STANDBY_Q_MGR.

    Currently I am on 9.2.0.4, will upgrading to 9.3.3.0 or higher solve my problem?



    ------------------------------
    Emile Kearns
    ------------------------------


  • 2.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Wed July 12, 2023 12:42 AM

    Hi Emile,

    The MIQM is behaving the way it is expected to. Only the active instance can be used. MQ for client connections can handle this without a load balancer as the channel table or conname can contain a list of addresses which can host the active queue manager. The REST API service only connects to the local queue manager (although this may change in future) as it uses local bindings, not client bindins.

    However, this is trickier with an HTTP service providing the REST API.

    The simplest things to do in most cases is implement a load balancer in front of the MIQM cluster with the 2 hosts load balanced behind it in the host group. The health check for the HTTP can look for the MQ port to be open (instead of the HTTP port) so that it directs all traffic to the active instance.

    If you don't have a commercial load balancer handy, you can implement something on linux using haproxy or anything with similar functionality for tcp sockets or http requests.

    It looks like MQ 9.3 supports remote connections from the REST API, so it would just be a matter of setting it up correctly and you can take advantage of MQ client ability to find the active queue manager instance.

    https://www.ibm.com/docs/en/ibm-mq/9.3?topic=mura-setting-up-remote-queue-manager-use-messaging-rest-api

    Regards,



    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019-22
    ------------------------------



  • 3.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Wed July 12, 2023 11:03 AM

    yes, set a load balancer on the MQ Listener port, so the REST service calls the correct queue manager.

    Also the new change in 9.3; you do nto have to setup SDR/RCVR channels any more It will work over CCDT.



    ------------------------------
    om prakash
    ------------------------------



  • 4.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Fri July 14, 2023 09:11 AM

    Prakash,

    Would you care to elaborate?



    ------------------------------
    Emile Kearns
    ------------------------------



  • 5.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Thu July 13, 2023 04:15 AM

    Hi Neil,

    Thanks for your response:

    The simplest things to do in most cases is implement a load balancer in front of the MIQM cluster with the 2 hosts load balanced behind it in the host group. The health check for the HTTP can look for the MQ port to be open (instead of the HTTP port) so that it directs all traffic to the active instance

    for the above to work in AWS environment, would have to be an ALB(Application Load Balancer) or NLB (Network Load Balancer)?



    ------------------------------
    Emile Kearns
    ------------------------------



  • 6.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Fri July 14, 2023 01:34 AM

    Hi Emile,

    I'm sorry to say that I don't know enough about AWS load balancers to be able to advise you. 

    Looking at https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html, it seems that ELB should support the requirement by configuring a separate health check port. I haven't done it, so you would need to try it out.

    Regards,



    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019-22
    ------------------------------



  • 7.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Fri July 14, 2023 04:39 AM

    This new feature for MQ REST API is available in version 9.3.3, I assume it is MQ CD.

    https://www.ibm.com/docs/en/ibm-mq/9.3?topic=mura-setting-up-remote-queue-manager-use-messaging-rest-api

    Any idea when it will be available in MQ LTS?

    I see the latest version for LTS in 9.3.0.6.

    Would the above feature be available in this version?

    If not, when will 9.3.3 be available for LTS?



    ------------------------------
    Emile Kearns
    ------------------------------



  • 8.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Sun July 16, 2023 05:54 PM

    Hi Emile,

    I'm not privy to IBM plans, but in general, new features are added in CD releases, and are rolled up into the NEXT LTS version release. They generally do NOT make there way into a mod level of the current release.

    So a new feature available in 9.3.3 should be available in the next LTS release which might be 9.4 or 10.0 or some other major version if IBM change the numbering system again.

    There are some minor variations on this theme, but I've only seen them apply in enhancing support of underlying OS versions (such as adding support for a new version of Windows).

    Regards,



    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019-22
    ------------------------------



  • 9.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Fri July 14, 2023 09:03 AM

    Neil,

    The simplest things to do in most cases is implement a load balancer in front of the MIQM cluster with the 2 hosts load balanced behind it in the host group

    What did you mean with host group?



    ------------------------------
    Emile Kearns
    ------------------------------



  • 10.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Sun July 16, 2023 05:58 PM

    Host Group...

    The name used in some LB implementations for the list of host/port combinations providing the service sitting behind the load balancer. For MIQM load balancing it would be the two hosts providing the MIQM cluster.

    Regards



    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019-22
    ------------------------------



  • 11.  RE: Setting up REST API on Multi Instance QMGRS to d Remote Administration and remote REST API calls

    Posted Mon July 17, 2023 09:16 AM

    Ok, thought so, just wanted to confirm



    ------------------------------
    Emile Kearns
    ------------------------------