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 » IBM MQ API Support » How can MQ client read messages from 2 queue managers

Post new topic  Reply to topic
 How can MQ client read messages from 2 queue managers « View previous topic :: View next topic » 
Author Message
fremar50
PostPosted: Thu Jul 31, 2008 8:04 am    Post subject: How can MQ client read messages from 2 queue managers Reply with quote

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
View user's profile Send private message
mlr
PostPosted: Thu Jul 31, 2008 12:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Thu Jul 31, 2008 1:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
fremar50
PostPosted: Thu Jul 31, 2008 5:08 pm    Post subject: How can MQ client read messages from 2 queue managers Reply with quote

Newbie

Joined: 31 Jul 2008
Posts: 6

It has to PUT/GET from both qmgrs at the same time.
Back to top
View user's profile Send private message
sridhsri
PostPosted: Thu Jul 31, 2008 6:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
AkankshA
PostPosted: Thu Jul 31, 2008 8:02 pm    Post subject: Re: How can MQ client read messages from 2 queue managers Reply with quote

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
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Jul 31, 2008 8:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
David.Partridge
PostPosted: Thu Jul 31, 2008 11:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Fri Aug 01, 2008 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message
fremar50
PostPosted: Fri Aug 01, 2008 7:05 am    Post subject: How can MQ client read messages from 2 queue managers Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 01, 2008 7:47 am    Post subject: Re: How can MQ client read messages from 2 queue managers Reply with quote

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
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Fri Aug 01, 2008 9:13 am    Post subject: Reply with quote

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
View user's profile Send private message
leoChina
PostPosted: Thu Sep 04, 2008 10:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » How can MQ client read messages from 2 queue managers
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.