Author |
Message
|
fremar50 |
Posted: Thu Jul 31, 2008 8:04 am Post subject: How can MQ client read messages from 2 queue managers |
|
|
Newbie
Joined: 31 Jul 2008 Posts: 6
|
We have MQ client on VMS/cache. We also have active/active configuration with 2 qmgrs on 2 different AIX boxes.
We need to know how to configure it so that client/cache applications can read/write from both qmgrs.
Help is greatly appreciated!!! Thanks in advance!! |
|
Back to top |
|
 |
mlr |
Posted: Thu Jul 31, 2008 12:56 pm Post subject: |
|
|
Novice
Joined: 29 Jun 2008 Posts: 13
|
connect to qmgr 1, read msgs
disconnect
repeat for qmgr 2
how hard was that to figure out? |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Jul 31, 2008 1:43 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
...so that client/cache applications can read/write from both qmgrs. |
Do you mean you want the client application to be MQCONNected to two qmgrs concurrently (at the same time, together) to do MQPUTs and MQGETs? Or only one qmgr at a time? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
fremar50 |
Posted: Thu Jul 31, 2008 5:08 pm Post subject: How can MQ client read messages from 2 queue managers |
|
|
Newbie
Joined: 31 Jul 2008 Posts: 6
|
It has to PUT/GET from both qmgrs at the same time. |
|
Back to top |
|
 |
sridhsri |
Posted: Thu Jul 31, 2008 6:02 pm Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
If you want to PUT/GET to 2 QMgrs, then I'm afraid, you'll have to call MQCONN twice and pass different handles to each. |
|
Back to top |
|
 |
AkankshA |
Posted: Thu Jul 31, 2008 8:02 pm Post subject: Re: How can MQ client read messages from 2 queue managers |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
fremar50 wrote: |
It has to PUT/GET from both qmgrs at the same time. |
run two instances of your application connecting to MQ... and specify the QM name accordingly... or if u have a simple program handling the connect for you then all you need to do is make each call twice with respective QM details.. _________________ Cheers |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 31, 2008 8:09 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
This should only happen in a bridge design.
Otherwise get back to the drawing board. The app should have no need to connect to 2 qmgrs. Reroute everything to that the app only needs to connect to a single qmgr.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
David.Partridge |
Posted: Thu Jul 31, 2008 11:26 pm Post subject: |
|
|
 Master
Joined: 28 Jun 2001 Posts: 249
|
If your intention is for one process to be connected to 2 different QMs and to pass messages between them, then the application will need at least two threads - one for each connection, and IIRC, you can only do this using MQClient. You'll then need to worry about communicating between the threads and synchronisation.
Alternatively, as AkankshA suggested, it may be so much easier to just run two instances of your application, one connected to each QM.
My real question though is what are you trying to achieve here, it seems that an MQ topology re-think would avoid the need to even think about this sort of problem.
If you can clarify the business problem, perhaps we can suggest a cleaner solution. _________________ Cheers,
David C. Partridge |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Aug 01, 2008 6:17 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
will need at least two threads - one for each connection |
If you intend to put/get in units of work (syncpoints), then a consideration is that MQCMIT/MQBACK use the connection handle, and you will have two of them. You would not be able to commit a put/get to both qmgrs in a single unit of work. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
fremar50 |
Posted: Fri Aug 01, 2008 7:05 am Post subject: How can MQ client read messages from 2 queue managers |
|
|
Newbie
Joined: 31 Jul 2008 Posts: 6
|
I hope this will clarify our purpose:
The 2 qmgrs in question are in an MQ cluster. We think there is no problem putting messages to the MQ cluster (we can use remote queue).
We need active/active configuration due to the business need of having an uninterrupted service at all times. We need to know how Client/Cache can pull messages from the MQ cluster in this case, how Cache client can pull messages from both members of the cluster?
Could you suggest any other MQ topology?
Question to fjb_saper: what is bridge design?
Thank you all so much for assistance! |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 01, 2008 7:47 am Post subject: Re: How can MQ client read messages from 2 queue managers |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
fremar50 wrote: |
I hope this will clarify our purpose:
The 2 qmgrs in question are in an MQ cluster. We think there is no problem putting messages to the MQ cluster (we can use remote queue).
We need active/active configuration due to the business need of having an uninterrupted service at all times. We need to know how Client/Cache can pull messages from the MQ cluster in this case, how Cache client can pull messages from both members of the cluster?
Could you suggest any other MQ topology?
Question to fjb_saper: what is bridge design?
Thank you all so much for assistance! |
Bridge design: moving msgs between 2 different JMSProviders...
In your case run the application on both active qmgrs in your hardware cluster.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Aug 01, 2008 9:13 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
In order for an application to MQGET a message from a queue, the application must be MQCONNected to the qmgr where the local queue with the message exists. There is no remote get. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
leoChina |
Posted: Thu Sep 04, 2008 10:15 pm Post subject: |
|
|
Novice
Joined: 04 Sep 2008 Posts: 14
|
you can use a MQ cluster to actualize the active/active?if it was, you could get the information from IBM website |
|
Back to top |
|
 |
|