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
  • 1.  Multiples Transmission queue in One Channel

    Posted Thu February 02, 2023 09:37 AM
    Hi MQ experts, Is it possible to use the same channel for multiple queues?

    I have this channel:

    It is possible to set more than one queue in the field "Transmission queue:"??

    Regards,



    ------------------------------
    Emanuel Gonzalez
    ------------------------------


  • 2.  RE: Multiples Transmission queue in One Channel

    Posted Fri February 03, 2023 03:34 AM

    Hi Emanuel,

    It is not possible to set more than one transmission queue per channel.

    Could you tell us more about what led you to want to do this. There may be an alternative solution, but since we don't know the problem you are trying to solve, we can't yet advise you further.

    Cheers,
    Morag



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



  • 3.  RE: Multiples Transmission queue in One Channel

    Posted Fri February 03, 2023 09:01 AM

    Hi Emanuel/Morag,
    Is it that Emanuel maybe wants to share the one channel to route messages to different queues ?

    Essentially, your application can either put to an Alias queue that names a remote queue as it's base queue, or you can put directly to a remote queue. In both cases, the message will end up on the transmission queue named in the remote queue. So, you can either define multiple alias queues that name the same remote queue as their base, or you can define multiple remote queues that all name the same transmission queue.

    E.g., on QM1 you could define alias, remote and transmission queues:

    AQ1 -> RQ1 (RNAME=LQ1, RQMNAME=QM2, XMITQ=QM2)

    AQ2 -> RQ1 (RNAME=LQ1, RQMNAME=QM2, XMITQ=QM2)

    AQ3 -> RQ1 (RNAME=LQ1, RQMNAME=QM2, XMITQ=QM2)

    But, with this approach, the same target remote queue name of LQ1 is used. If you want messages to be put to different target remote queues, on QM1, you need to define multiple remote queues that have different values set in their RNAME fields:

    RQ1 (RNAME=LQ1, RQMNAME=QM2, XMITQ=QM2)

    RQ2 (RNAME=LQ2, RQMNAME=QM2, XMITQ=QM2)

    RQ3 (RNAME=LQ2, RQMNAME=QM2, XMITQ=QM2)

    Of course if you want to use Alias queues in this case, then you could easily define AQ1 -> RQ1, AQ2 -> RQ2, and AQ3 -> RQ3.

    Note: If you do not set XMITQ in the remote queue definition, we look for an XMITQ with the same name as the target QMgr specified in the RQMNAME field, which is QM2.

    On QM2, you would define the local queue(s)

    Messages put to AQ1, AQ2, AQ3, RQ1 or RQ2 all end up on XQ which is served by your sender channel.The sender channel sends to the receiver channel which will put the messages either to LQ1 only, or to LQ1, LQ2 and LQ3.

    Regards .. Mayur



    ------------------------------
    Mayur RAJA
    ------------------------------



  • 4.  RE: Multiples Transmission queue in One Channel

    Posted Fri February 03, 2023 09:03 AM
    Edited by Mayur RAJA Fri February 03, 2023 09:04 AM

    Apologies, I added a third remote queue so that last paragraph should have read:

    Messages put to AQ1, AQ2, AQ3, RQ1, RQ2 or RQ3 all end up on XQ which is served by your sender channel.The sender channel sends to the receiver channel which will put the messages either to LQ1 only, or to LQ1, LQ2 and LQ3.

    And, I just realised that I could have edited my initial post :-)

    ------------------------------
    Mayur RAJA
    ------------------------------



  • 5.  RE: Multiples Transmission queue in One Channel

    Posted Fri February 03, 2023 09:10 AM

    Hello all, thanks for the reply.

    I have two local queue PROS.AVS.OUT and PROS.TYPEB.OUT, each one with your remote queue.

    In the queue manager i create an channel, the local queue send different message (typeb / ssm).

    My idea is use only one channel to route the message to de remote consumer.


    Sorry for my english, i still learning.



    ------------------------------
    Emanuel Gonzalez
    ------------------------------



  • 6.  RE: Multiples Transmission queue in One Channel

    Posted Fri February 03, 2023 10:04 AM

    Hi Emanuel,

    As long as PROS.AVS.REMOTE and PROS.TYPEB.REMOTE both name transmission queue PROS.TYPEB.OUT, it should work. But, you may want to give your transmission queue a name that relates to your remote queue manager (e.g. VAYANT01, assuming your sender channel naming convention is localQMgrName.remoteQMgrName).

    Regards .. Mayur



    ------------------------------
    Mayur RAJA
    ------------------------------



  • 7.  RE: Multiples Transmission queue in One Channel

    Posted Fri February 03, 2023 12:34 PM

    Q: It is possible to set more than one queue in the field "Transmission queue:"??

    A: No



    ------------------------------
    Bob
    ------------------------------



  • 8.  RE: Multiples Transmission queue in One Channel

    Posted Fri February 03, 2023 02:07 PM
    Hi Emanuel,

    To answer your question directly, the answer is no, you cannot define more than one transmission queue per channel.  The channel will use that transmission queue, and only that transmission queue, to transmit messages to the remote queue manager.

    The correct answer is a little different.   While you can have only one transmission queue, you can have multiple QueueRemote objects referencing the same transmission queue.  This will allow different applications to open different queues for output, and noe of them have to be aware that the messages are all going to the same destination.

    Thus:  
    define qremote(APP1.PUTQ) rname(REMOTEQUEUE) rqmname(RMTQMGR) xmitq(PROS.TYPEB.OUT)
    define qremote(APP2.PUTQ) rname(REMOTEQUEUE) rqmname(RMTQMGR) xmitq(PROS.TYPEB.OUT)
    define qlocal(PROS.TYPEB.OUT) usage(xmitq) trigger trigdata(KIUTBS.VAYANT01) initq(SYSTEM.CHANNEL.INITQ)

    I hope this helps.
    David

    ------------------------------
    ----------------------------------------------------------------------
    David Awerbuch
    Senior Messaging Specialist, Firefighter, all around great guy.
    ------------------------------



  • 9.  RE: Multiples Transmission queue in One Channel

    Posted Fri February 03, 2023 02:18 PM

    Hi,
    Can you help explain what is the requirement per se?

    Are you looking to have Multiple Channels send data from a single XMIT queue to a single or to multiple remote Queue Managers?

    It is possible to use the single Cluster XMIT queue to send messages to a single or multiple Remote Queue managers, with creative use of the MQ Alias QM names, you could use this to send data over multiple Channels from the single Cluster XMIT queue to the same remote Queue Manager effectively allowing the transmissions to overlap provided you have sufficient bandwidth.

    See examples in:

    Configuring an MFT agent for multiple channels in a cluster



    Best Regards

    Honda


     



    ------------------------------
    Honda Bhyat
    Land O Lakes FL
    ------------------------------