Author |
Message
|
bbanks |
Posted: Mon Jan 14, 2002 11:30 am Post subject: |
|
|
 Newbie
Joined: 01 Jul 2001 Posts: 8 Location: Concord, CA
|
I currently have a setup with MQ on NT and two different AS/400's. The current setup sends msgs from the NT to one AS/400 just fine. We have a new AS/400 we've added that needs to "mock" the old AS/400 so we can eventually cut-over to the new box.
Does anyone know a way that I can configure MQ so that any message sent to the old AS/400 will also be sent to the new AS/400 ?
Thank you in advance.
Bob Banks |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jan 15, 2002 11:42 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
MQ will not replicate or copy / move the same message to multiple destinations (except for Pub/Sub).
Awhile ago, I wrote a simple "Message Multiplexer" (MMX) to do the job. It is written in C and is cross-platform complaint. You can download it from my web site.
http://www.geocities.com/capitalware/mqseries.html
You can run it on WinNT or AS/400 (your choice). Basically, you need a handler queue for MMX to read from and it will send (replicate including the MQMD) the message to "n" queues (up to 99).
Later
Roger...
[ This Message was edited by: RogerLacroix on 2002-01-15 23:43 ] |
|
Back to top |
|
 |
NickB |
Posted: Wed Jan 16, 2002 3:18 am Post subject: |
|
|
Centurion
Joined: 20 May 2001 Posts: 107 Location: Zurich Financial Services
|
Distribution lists introduced with MQ version 5 will allow a single MQPUT to be directed to multiple queues. This does of course mean that you need to change your application to use the MQOR structure. |
|
Back to top |
|
 |
bbanks |
Posted: Wed Jan 16, 2002 11:12 am Post subject: |
|
|
 Newbie
Joined: 01 Jul 2001 Posts: 8 Location: Concord, CA
|
Thank you for your replies.
Is there anyway to do this using clustering so that the application could send to a cluster queue and when the old AS/400 is "turned off" it automatically goes to the new box ?
Thank you in advance.
Bob |
|
Back to top |
|
 |
NickB |
Posted: Thu Jan 17, 2002 1:56 am Post subject: |
|
|
Centurion
Joined: 20 May 2001 Posts: 107 Location: Zurich Financial Services
|
Yes, clustering could help you here. If you define a cluster queue on both queue managers then one goes out of service, MQ will ensure that the messages get sent to the queue manager which can service them. |
|
Back to top |
|
 |
bduncan |
Posted: Thu Jan 17, 2002 2:26 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Also, while both AS400's are up, you can use clustering to load balance your messages between the two queue managers. Then when one of the machines goes down, MQSeries will automatically start routing ALL the messages to the remaining AS400, as oppossed to the round-robin method it uses when multiple queue managers hosting the same clustered queue are available.
_________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
bbanks |
Posted: Thu Jan 17, 2002 3:30 pm Post subject: |
|
|
 Newbie
Joined: 01 Jul 2001 Posts: 8 Location: Concord, CA
|
Thank you again.
So, the trick then is for BOTH machines to have queue managers in the cluster ? Would they each have a repository or share one ? Would they also both have the exact QMgrs and queues ?
Thanks,
bob |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Jan 17, 2002 10:46 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Be careful. There is a fine line between what can be done with clustering and what we would like clustering to do.
Your original post sounded like you wanted hot-swap ability. Clustering will work fine except one problem.
Lets say you have 2 queue managers (1 per AS/400 box) called MQA1 and MQB1 in a cluster. If you have defined a cluster queue called Queue1 then MQ will gladly work as Brian has stated.
If there were 3 messages on Queue1 (cluster queue) of MQA1 and MQA1 ended (normally or abnormally) then those messages will be stuck on MQA1 until it is restarted. MQB1 will get all future messages destined for cluster queue Queue1 but it will NOT get the 3 stuck messages on MQA1.
Someone will need to decide if this is acceptable or not (i.e. financial transactions vs web queries). Are these critical messages? Some food for thought.
later
Roger...
|
|
Back to top |
|
 |
bduncan |
Posted: Fri Jan 18, 2002 2:08 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
True... Also, bbanks, when you ask "Would they each have a repository or share one ?" Keep in mind that in a cluster, all queue managers in it have a repository. It's just that some machines have partial-repositories, while others have full-repositories. The rule of thumb is to define two machines as full-repositories; it doesn't matter which two, although you'll probably want to choose your two most reliable machines
But there's nothing stopping you from having more or less full-repositories, although you can't have a cluster with zero full-repositories.
To your other question, "the trick then is for BOTH machines to have queue managers in the cluster ?" the answer is yes. To see a clustered queue on another queue manager, both it and the queue manager your application is connected to must be members of the same cluster. The moment this is true, then every clustered queue on that queue manager is accessible from your queue manager. Someone will probably correct me if I fail to mention that queue managers can actually be members of mulitple clusters, and there's nothing stopping a queue manager from having one clustered queue '1' which is a member of cluster 'A' and another queue '2' which is a member of cluster 'B'. This means all queue managers in cluster 'A' will be able to see the '1' queue, but not the '2' queue, and vice-versa.
So keep this in mind. When you add a queue manager to a cluster, you do so by creating a cluster sender and cluster receiver channel between that machine and one of the full repositories for the cluster. So now the queue manager is a member of the cluster, but this doesn't mean that all of its queues automatically become visible to the cluster. Each individual queue must be made a member of the cluster. So you can have a clustered queue manager with some queues in the cluster, some queues in another cluster, and some queues not in any cluster.
_________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
|