Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MQ Load Balancing

Status
Not open for further replies.

mqman

IS-IT--Management
Apr 3, 2002
2
0
0
US
Would anybody know if it's possible to load balance across a cluster using a local definition queue? That is, if I have 2 QM's (clustered) each with TEST.Q shared. Can I put to the local definition of TEST.Q on QM1 and have it round robin between the 2 QM's? Any advice is appreciated.
 
Hi,

as far as I know.. there is an algo available with the MQ already which does this round robin for messages coming to a cluster.

What you require is a non repository queue manager also as part of the same cluster along with the other two queue managers. If you send a message to this Q called TEST.Q, and if that's a local queue of taht queue manager, then it will not get routed to any other queue manager even inside a cluster. But if you have these two repository queue managers with local queues TEST.Q and the other non repository queue manager which doesn't have a local TEST.Q, then if you send a message to this non repository queuemanager with queue as TEST.Q, it will get routed in a round robin fashion to any of the other two QMGRs. Hope this will help.

if not, let me know..
lecMns
B'lore
 
On the same issue of Load Balancing ( this question maybe not too smart .. but I dont have an installation Of mq, and would really appreciate some feedback )

This is what I am trying to do ....

Scenario : i) System Billing.

ii) System Adapters.


SystemBilling Has a QManager , lets call this
Billing-QM

System Adapters Has multiple Q-Managers, call them
Adapters-QM1, Adapters-QM2 .... Adapters-QMn.

These QManagers form a Cluster.

Each of the Q-Managers ( The Adapters Systems ) have a
Q called Receiver-Q, i.e Receiver-Q on Adapter-QM1,
Receiver-Q on Adapter-QM2

---- To enable Load Balancing ---



I am trying this ....

On the Billing System Side :

The remote Definition for the Receiver-Q is on
Billing-QM. Now .. Is that even possible ? .. How will
I name the Qmanager ...

Define QREMOTE( Receiver-Q) RNAME ( Receiver-Q ) +
RQMNAME( what name should i use here . - NOTE 1. ) +
XMITQ( BillingToAdapter)

Define a Xmit Q as :

Define QLOCAL( BillingToAdapter ) USAGE( xmitq )

Define The Sender Channel

Define CHANNEL( Billing.Adapter ) + CHLTYPE(sdr) +
XMITQ( BillingToAdapter) +TRPTYPE(tcp) + CONNAME(
IpAddressofAdapter)

On The Adapter Side :

Define the Queue from which the Adpater Application
program will receive the message ...

Define QLOCAL(Receiver-Q) ... I will do this for every
QueManager ... i.e Adapters-QM1, Adapters-QM2 ....
Adapters-QMn

Channel Definition :

Define CHANNEL(Billin.Adapter) CHLTYPE( rcvr ) +
TRPTYPE( tcp )

-------------------------------------------------------------------------------------------------------



Now this is what i need to know ... If I specify the
name of any of the QueManagers from the List:
Adapters-QM1, Adapters-QM2 .... Adapters-QMn in the
defintion of the remote -q ( Refer -Note 1 )

and remembering the fact that the Q-Managers on the
Adapter side form a cluster .... will the Algorithm
for Load Balancing kick in ... If not ... How do i
solve it ?




 
I found an article that is a step by step process on how to setup two repository queue managers and one non repository queue manager for MQSeries for Windows v5.1. I successfully configured the three servers, and created a VB client that puts messages on the clustered queues thru the non repository queue manager. I am unable to read the messages I just put on the clustered queues. Is there a configuration that will allow me to get the messages I just put on the clustered queues thru non repository queue manager?

I can be reached at nel_martins@hotmail.com if you have a comment or suggestion.

Thanks!
 
Guys..

let's make one thing very clear..

you can start a listener only on a physical queue.. !
not on the copy of a clustered queue.

what I meant to say is..
suppose you have QMGR 1 and QMGR 2 clustered and you have a physical local queue 'Qa' created in QMGR 1.

Now, there is no copy of Qa in QMGR 2.
You can start a listener on Qa in QMGR 1

Now, if you cluster the QMGR 1 and QMGR 2, and if you make Qa of QMGR 1 a clustered queue in this cluster, you will get a copy of Qa in QMGR 2.

Now, you cannot statr a listener on this copy of Qa in QMGR 2.

Hope that's clear.
(But definitely if this feature was available, it would have been a great help! :) )

Now to set up the load balancing with the default algorithm whcih is the round robin algorithm, all you have to do is the following like Nelm has mentioned.

you require a non repository QMGR for sure.
then you have other QMGRs whcih are repository QMGRs which means that they hav physical queues in them. Now all of these QMGRs are clustered including the non repository QMGR.

You should send your messages only to non repository QMGR to get the load balancing done!

Since they are clustered and non repository QMGR doesn't haev a queue, it gets routed to one of the repository QMGRs who has that queue.

When you sent a message to non repository QMGR, you only mention the Queue name the IP, port and few other things. This quee name whic you have mentioned must be physical queues and should be a clustered queue to in the repository QMGRs so that message can go to one of those Queues in them.

Hope taht's clear..
if not revert back..
may b I'll turn a bit helpful for you guys :)

All the best guys..
mNs

lecMns
B'lore
 
Wow - lots of confusion about clustering in this thread. I have written a couple of articles on clustering you can find on IBM's MQSeries web site (under library..articles) - check them out (perhaps the one mentioned above).

The most disturbing comment offered here is using a remote queue definition. With pure clustering, you don't define any remote queue defs.

Round robin is the default load balancing mechanism for MQ clustering, and works fine as long as there is no local definition of a cluster queue on the system where your app is running. If there is, all messages will go to the local instance of the queue.

the article is at: ftp://ftp.software.ibm.com/software/ts/mqseries/library/articles/meridew_2.pdf

Cheers,

Scott Meridew
Certfied MQSeries Specialist
TxMQ Inc.
scott@txmq.com Scott Meridew
Certified MQSeries Specialist,MCSE
MQ Squared Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top