ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Clustering » New to MQ Clustering : Request for Clustering Help

Post new topic  Reply to topic
 New to MQ Clustering : Request for Clustering Help « View previous topic :: View next topic » 
Author Message
mdeverkonda
PostPosted: Mon Aug 25, 2003 6:37 am    Post subject: New to MQ Clustering : Request for Clustering Help Reply with quote

Newbie

Joined: 25 Aug 2003
Posts: 5

Hello,

I am encountering some problem with MQ Clustering.
I am sure i am doing something wrong or missing a big step in
the whole process.

Scenario:
Create a cluster of Queue Managers running on same machine.
Route the message from one cluster queue to another cluster queue.
If one queue manager is stopped, the message has to be deliverd to another
queue.


Solution I tried:

Created 4 queue managers :

Test1.queue.manager (Full repository)
q1 (cluster)
q2 (cluster)

Test2.queue.manager (Full Repository)
q1 (cluster)
q2 (cluster)

Test3.queue.manager
q1 (local)
q2 (cluster)

Test4.queue.manager
q1 (cluster)
q2 (local)

I have configured Dead Letter Queue for Test1.queue.manager as q2 (cluster).

When Test3.queue.manager is running, when i put messages in q1 (Test1.queue.manager), messages are getting routed to q1 (Test3.queue.manager)

Now When I stop Test3.queue.manager, and put messages in the q1 (Test1.queue.manager),
messages are supposed to be routed to q2 (Test4.queue.manager).
But this is not working.

When I read the document, there are some concepts I saw, which I am not very clear about yet.
MQ Workload Exits and User Exits.
My Question is Do we need to write Workload exits or user exits to achieve what I am
trying to achieve ?

Any help is greatly appreciated.
_________________
Regards
Madhav Deverkonda
Back to top
View user's profile Send private message
vennela
PostPosted: Mon Aug 25, 2003 6:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Madhav:

No, that is not how it works.

To better understand it delete the q1 (local) on Test3.queue.manager. Now connect to the QMGR Test3.queue.manager and try to put a few messages to q1. The messages will be distributed among the other three QMGRs(the messages will be on q1). Stop one of the QMGRs (say stop Test4.queue.manager). Put few more messages. The messages that you PUT in the second run will be distributed among the QMGRs (the messages will be on q1)that are active.



Quote:
Now When I stop Test3.queue.manager, and put messages in the q1 (Test1.queue.manager),
messages are supposed to be routed to q2 (Test4.queue.manager).

Your above concept is not right.


Last edited by vennela on Mon Aug 25, 2003 7:02 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mqonnet
PostPosted: Mon Aug 25, 2003 6:48 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

You cannot put messages on Q1 and expect them to land up on Q2. Which is what is mentioned in your writeup.

//
When Test3.queue.manager is running, when i put messages in q1 (Test1.queue.manager), messages are getting routed to q1 (Test3.queue.manager)

Now When I stop Test3.queue.manager, and put messages in the q1 (Test1.queue.manager),
messages are supposed to be routed to q2 (Test4.queue.manager).
But this is not working.
//

In the 1st case everything works as expected because you put messages on queue q1 that has a local instance on Test3 qm. But when you stopped this qm, the message is not routed to any queue, but to the DLQ. Because there is NO OTHER LOCAL instance of this queue.

In the 2nd case, what you should try is to put to q2(test1.queue...) instead of q1.

Now if you had a local instance of q1 on Test4, and you stopped Test3 qm... then messages would be routed to this qm, test4.

Also bear in mind, DEFBIND or default binding mode on an mqopen Makes a ton of difference.

Hope this helps.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mdeverkonda
PostPosted: Mon Aug 25, 2003 7:46 am    Post subject: Reply with quote

Newbie

Joined: 25 Aug 2003
Posts: 5

Thanks a lot for quick replies..

But I still have some confusion.
In response to vennela -

If I delete q1 on test3.queue.manager, the q1 clusters on other three queue managers are also getting deleted. Where so you want me to put messages..

All I want to do is...
setup 3 queue managers.
One to just put messages in a cluster queue and other two should host the queue.

And when I put message in cluster queue in queue manger 1, that message has to be deliverd to hosting queue managers in round robin or something. If one manager is down other one should recieve it.

User need know who is hosting his queues. That way we have high availability...and all other good stuff.

That was the reason why I was trying that wierd setup as I mentioned before.

Can you please tell me what is right approach to do this.
_________________
Regards
Madhav Deverkonda
Back to top
View user's profile Send private message
mqonnet
PostPosted: Mon Aug 25, 2003 8:00 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

If you just want to get a feel of load balancing using round robin method. You need to make some changes to your queue defs.

Both q1 and q2 MUST have a LOCAL instances eachon Test3 and Test4.

Then either code in your app to open with DEFBIND_NOT_FIXED or modify these queue defs to say DEFBIND(NOTFIXED). That way the load balancing algo would come into picture and would do what you intend to do.

In that case when you stop Test3, and try to put to q1 from test1 qm, all messages would be routed to Test4 q1. Now to achieve just this, you DO NOT need to do the defbind thing. Because in any case the messages would be routed to a running qm that has a LOCAL instance of the queue you were referring to.

In your case the problem lied in the fact that you did NOT HAVE any instance of the local queue other than Test3. All other cluster queue managers only had a reference to this queue. And when you down this qm, there exists no reference and hence the queue resolution fails.


Venny, What you said would not work. Because Q1 does not have a LOCAL INSTANCE of the queues other than Test3 qm. All others just have a reference to this queue. So at all qms any opens would be doing a queue resolution, which would fail since Test3 isnt running. What you said would work like a charm if you had a local instance of the queues at all the other queue managers and you had DEFBIND(NOTFIXED).

Hope this helps.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mdeverkonda
PostPosted: Mon Aug 25, 2003 10:27 am    Post subject: Clustering help Reply with quote

Newbie

Joined: 25 Aug 2003
Posts: 5

Kumar,

Sorry for keep bugging..

This is where i am stuck now.
same scenario.. I created 4 qms.
I have local queues in all four qms.
Now in my application, which QM name am I supposed to give.

Thanks
Madhav
_________________
Regards
Madhav Deverkonda
Back to top
View user's profile Send private message
mqonnet
PostPosted: Mon Aug 25, 2003 10:48 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

If it is just for testing purpose then you could use any QM as long as all the qm's can see the clustered queues. Moreover you dont need to define local instances on all the qms, but upto you. But if this is a production system then its a design question and you have to architect this before you jump into it.

As i mentioned earlier, you have to bear in mind about the Default Binding mode when opening a queue or altering a queue def. Because that makes the difference in getting a workload algo work or not.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vennela
PostPosted: Mon Aug 25, 2003 10:52 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Madhav:

If you have four QMGRs in a cluster, and if the cluster name is CLUS1 ->

On the command prompt
runmqsc QMGR1

define ql(QLC1) CLUSTER(CLUS1) DEFBIND(NOTFIXED)

end

Do the same for the other two QMGRs (2nd and 3rd)

runmqsc QMGR2

define ql(QLC1) CLUSTER(CLUS1) DEFBIND(NOTFIXED)

end

runmqsc QMGR3

define ql(QLC1) CLUSTER(CLUS1) DEFBIND(NOTFIXED)

end


On the command propmt again:
amqsput QLC1 QMGR4
Put 6 messages (each line is a message)

You will see two messages in the queue hosted by each of the first three QMGRs.

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mdeverkonda
PostPosted: Mon Aug 25, 2003 12:00 pm    Post subject: Clustering help Reply with quote

Newbie

Joined: 25 Aug 2003
Posts: 5

I understood that messages are getting propagated to all the queues
I am not able explain my concern here...
Let me give another shot..

As you all mentioned before .. I created 4 qms, created local queues in all
of them (except in QM1). And put all of them into cluster.

Now user application always deals with QM1 - q1.

Whenever i put message MQ randomly sends the message to one of theQMs (QM2, QM3, QM4) local queue.

Now I have another user application which wants to read message thats put by user application1.

What queuemanager name am i supposed to give in this application ?
becuase, there is no guarantee that message will be sent to the same queuemanager queue all the time.

Hope I conveyed my question clearly this time.

thanks for your patience with me.
_________________
Regards
Madhav Deverkonda
Back to top
View user's profile Send private message
mqonnet
PostPosted: Mon Aug 25, 2003 12:15 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Well, in a clustered environment this is an issue. Because one of the main tasks achieved by clustering is to load balance and disaster recover your qm and msgs. Now in your case, you might want to either defbind(fixed) so that all msgs land up on only one queue. Or you could do a get each from all the various instances of the queue on all the qm's. No other go, as far as i can think of.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
EddieA
PostPosted: Mon Aug 25, 2003 4:31 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

For your last post, the idea is that you have the 3 copies of application running. One servicing QM2, one for QM3, and the last for QM4. That way the application load is spread across the 3 copies of the application.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
sdvivek
PostPosted: Tue Aug 26, 2003 7:30 am    Post subject: Reply with quote

Newbie

Joined: 15 May 2001
Posts: 1

Mr. Madav,

One thing I would like to say is, when u have a local instance of the queue (clustered one), then all the msgs from ur application would be placed in that Q. I mean, if ur application is connected to QM1 and QM1 has a local queue Q1 and also has clustered Q1, then all the msgs routed to the local Queue Q1. If u don't ahve a local instance, then all the msgs would be routed to rest of the remote qmgrs using round robin approach provided they have a cluster instance of the same queue.

MQSeries work load management is not the same work load management used in other terms. Its basically for work load distribution. Just distributes by default using round robin approach. U can modify by writing some cluster exits.

High avaialbility means, not that if one qmgr goes down, all the msgs in the local cluster queue can be retrived from a different queue manager. Here HA means, ur appl. can put the msgs continuously even one qmgr is down. Thats all

One way, u can make sure that all the msgs can be placed in one remote Qmgr in cluster by open with "defbind fixed". But no way to moniter one QM for all your msgs. U can write a exit to do this job but not by default

Hope this makes clear on your doubts. Any more, please post it
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
mdeverkonda
PostPosted: Tue Aug 26, 2003 8:16 am    Post subject: Clustering help Reply with quote

Newbie

Joined: 25 Aug 2003
Posts: 5

Putting messages is understood...
I am having problems with reading messages...

Let me explain my scenario again.. just for Context sake..

Machine1 - QM1 (Repos) - cluster queue
Machine2 - QM2 (Repos) - cluster queue
Machine3 - QM3 (Not Repos) - local queue

Now I have a java pgm which puts message to QM1-clusterqueu.. It automatically gets routed to QM3. right ?

I want to write another java pgm to read messages..
What QM name am I supposed to give..
I gave QM3 and machine3 (hostname).. I could browse message.
If i give QM2 and machine2.. I get 2059 error
If I give QM3 and machine2.. I get 2059 error

Is there anyway that I just have one QM name.. so that all my read and write pgms use same QM.

Calling pgms need not know that they are talking to clustered pgms ?
_________________
Regards
Madhav Deverkonda
Back to top
View user's profile Send private message
Ratan
PostPosted: Tue Aug 26, 2003 9:27 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

Kumar wrote:
Quote:
Now in your case, you might want to either defbind(fixed) so that all msgs land up on only one queue.


I am not an MQ expert, so I am confused with kumar's statement. I am not sure if defbind(fixed) will send the messages to a single Queue. From my understanding using both defbind(fixed) or not fixed messages will be load balanced. The only differnce is with "fixed" messages will always roundrobin between all the QMs in the cluster even if they are active or not. With "Not Fixed" messages will only be sent to active QMs.
Correct me, if I am wrong.
Madhav,
I am unable to understand what you are trying to acheive. When you are clustering your QMs it is for load balancing. Now if you want to use the same application to read from all the clustered QMs, you are killing load balancing.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
mqonnet
PostPosted: Tue Aug 26, 2003 9:59 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Ratan,
What i meant in that statement is if you code in your app on an open with MQOO_BIND_ON_OPEN, then MQ would "pick" one "available" Qm and forward all messages to that qm(this must host a local instance of the clustered queue). Now if you dont want to change your application you could modify the clustered queue attribute, but this has to be consistent with all the instances of this queue def accross the cluster. And modify it to be DEFBIND(OPEN), which is equivalent to you adding the option mentioned above in your appl.
Only and Only in the above cases the messages are put to ONE queue.

Now if you modify all your cluster queue instances to DEFBIND(NOTFIXED) or you code in your app MQOO_BIND_NOT_FIXED, ONLY cluster load balancing would come into picture. No OTHER way can you get this load balancing, other than writing your own cluster workload exits etc. Which is out of the scope of this dicussion.

//
The only differnce is with "fixed" messages will always roundrobin between all the QMs in the cluster even if they are active or not. With "Not Fixed" messages will only be sent to active QMs.
//
Take a look at the above explaination, that would clear your doubts.

What Madhav is trying to do is write a Get app to retrieve messages. But he is unable to decide which qm he should select.

As i have been repeatedly mentioning, Clustering is for Putting messages and not Getting messages. You cannot get a message off a clustered queue unless it is local to the qm that you are connected to.
Under all circumstances you must architect this properly and code your get app accordingly.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Clustering » New to MQ Clustering : Request for Clustering Help
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.