MQ

 View Only
  • 1.  Copying existing queues form another queue manager

    Posted Tue September 21, 2021 03:20 PM
    I created a clone of one our MQ Windows test servers and created some new queue managers on the new cloned server, is there a way to copy the existing queues from the cloned Windows system to the new MQ server? 

    Also is there a way to setup failover without clustering between the two servers, possibly using the channel tables? I am fairly new to this.

    We currently have a couple other MQ Dev/MQ servers that were setup for this, but for some reason the failover is not working? From what I understand this did work previously, also cannot find any logs to see if any errors are generated.

    Thanks!


  • 2.  RE: Copying existing queues form another queue manager

    IBM Champion
    Posted Wed September 22, 2021 03:01 AM
    Hi Skid,

    I'm not sure it will do what you actually want, but you can export the queue configuration from a queue manager using the dmpmqcfg utility (dump mq config).

    This will produce a file of mqsc commands (or setmqaut commands if you ask for the security configuration to be dumped in that format).

    You can then edit out the ones you don't need, and use the rest as input to runmqsc on your new queue manager to create queue definitions that match those on the original queue manager.

    But whether that will provide your applications what they need is a different question.

    It is NOT producing copies of the same queues. There is no communication between the queue managers. A message put to Queue ABC on Queue Manager QM1 is not available in queue ABC on Queue Manager QM2.

    MQ is different to some other messaging systems in this respect. Other than on zOS, where shared queues are possible, each MQ queue manager is independent of all others. Messages can move between queue managers through sender/receiver channels or cluster channels, but an application connected to one QM cannot pull messages from a different queue manager (again... even if the queue names are the same).

    Depending on what your applications need to do, a configuration with 2 different queue managers on two servers might work. If for example the applications are sending requests to a 3rd queue manager via their connected QM, and receiving responses, and both queue managers have channels connecting them to the 3rd queue manager, then the application needn't care which QM it is connected to. It will be able to achieve its goal (send a request and receiving the matching response) using either QM.

    But if your applications need to receive messages (say requests that they process) from somewhere else, the 2 queue manager configuration is not going to work. At least not without an MQ cluster to distribute the messages with load balancing, and perhaps an MQ uniform cluster to permit your server applications to load balance across the available queue managers.

    In the absence of MQ Clusters, you most likely need a single queue manager that can be hosted on more than one server. This could be achieved (on Windows) with MSCS (Microsoft Cluster Services) managing the queue manager, ip address and disk as resources in a resource group. It could also be achieved using SMB shared disk or SAN clustered disk and Multi Instance Queue Manager capability (MIQM).

    We need a bit more information about what you are trying to do in order to provide useful advice on how those requirements could be achieved.

    Regards,

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



  • 3.  RE: Copying existing queues form another queue manager

    IBM Champion
    Posted Wed September 22, 2021 06:00 PM
    Hi Skid,

    further to your email, I try to respond on the group so that messages are archived and available for others to search. It's amazing how often my questions have been answered by a google search finding things in a forum like this one.

    Anyway, you extracted the configuration from the old QM using dmpmqcfg (something like dmpmqcfg -o mqsc -m TECHNT -a >TECHNT.mqsc). You then used it to create objects with the same names in the new QM using using:
    >> runmqsc TQMDJ2 <TQMDJ1.mqsc

    And asked the question:

    >> This did copy the queue entries to the new defined queue manager, however is there a way to change the channel names or alter them so the channel points to TQMDJ2?

    I would suggest that this did not really COPY the queue entries to the new queue manager. You effectively defined a configuration (which was the same as the old queue manager) and added all of those objects to the new queue manager. There is no way to rename objects.


    >> So if I have channels defined as TQMDJ1 after the copy of the mqsc file, is there a way to rename them?

    Sorry that I have only bad news on this point. MQ doesn't provide a way to alter the name of any object, only the attributes. So, if you want to have a channel on the new queue manager with a different name, you need to edit the mqsc file exported from the old QM before using runmqsc to add the configuration to the new QM.

    Now that you have already created the objects on the new QM, you will need to delete them, edit the mqsc file to change the names, and then create them again using the mqsc file as input to runmqsc.

    Regards,




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