Author |
Message
|
AntonGolovin |
Posted: Thu Aug 03, 2006 6:10 am Post subject: Question on MQ communication using the MQ client... |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
I am an MQ newbie, and I would like to make applications talk to an MQ server on a different computer via MQ client. I understand the mechanism by which to put messages on the server using the client. But what mechanism should I use for the same applications which need to get messages from the MQ server? Can I use the client, or is the client for putting messages only, not getting them?
Thank you for your reply! |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 6:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The only thing you need to understand about the client is this. It's not different from using a server connection except you can't do XA.
In GENERAL, the connection you establish is to ONE queue manager. You can PUT messages to any queue on any queue manager. You can only GET messages from queues that are qlocal to the qmgr you are CONNECTED to. This is true for clients AND servers.
Read the Application Programming Guide. Then read the Clients manual.
Then read the Intercommunications Guide. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
AntonGolovin |
Posted: Thu Aug 03, 2006 6:21 am Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
Can I connect to several queue managers via the client? Our system runs seven, and all seven are needed...
Thanks for your help. |
|
Back to top |
|
 |
obriencm |
Posted: Thu Aug 03, 2006 6:26 am Post subject: |
|
|
Acolyte
Joined: 31 Jan 2002 Posts: 64 Location: Ireland
|
yes you can connect to more then one MQSeries server (Qmgr) using a Channel table file, this contains the definitions of all the Qmgrs etc. that are needed. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 6:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
AntonGolovin wrote: |
Can I connect to several queue managers via the client? |
Yes.
AntonGolovin wrote: |
Our system runs seven, and all seven are needed... |
No, it's not needed.
The only kind of application that needs to connect to more than one queue manager at a time is a monitoring application.
Every other kind of application can do everything it needs to do by connecting to one queue manager.
If you want to scale up your application, you can run multiple copies of it, each connecting to one queue manager. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 03, 2006 6:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AntonGolovin wrote: |
Can I connect to several queue managers via the client? Our system runs seven, and all seven are needed...
|
If you need 7 client connections in 1 application, you've either got an MQ monitor (and there are commercial offerings that will do a better job) or you've got a very strange MQ setup indeed! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AntonGolovin |
Posted: Thu Aug 03, 2006 6:35 am Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
Our set up is that we run many different application on a box, and every one of those except one needs to connect to a separate queue manager on a different box. Therefore, I was wondering if that could be done... |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 03, 2006 6:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ah!
Then you need the client table obriencm suggested.
Though you might be better advised to connect to a single queue manager and use that to hop to the target one, either via point to point or clustering. Simplifies maintence & improves scaleability IHMO, but it's your set-up  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AntonGolovin |
Posted: Thu Aug 03, 2006 6:42 am Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
I am sorry for my newbie-ness, but I am still not 100% clear. In the client, I am able to make many queue managers visible. (WebSphere MQ 6.0.) I was wondering if that is the table you are talking about... If not, how would I implement the table. (I am thinking maybe MQ 6.0 lets me do it from the GUI - the Explorer.)
Thank you for your help. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 6:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Vitor wrote: |
Then you need the client table obriencm suggested. |
Only if AntonGolovin doesn't want to use MQCONNX or MQSERVER.
AntonGolovin -
Different applications on the same machine can connect to different queue managers.
The same application can connect (using a client connection) to more than one queue manager - but it's not recommended.
The same application CAN NOT connect to more than one queue manager using a server connection, and CAN NOT mix server connections and client connections.
Different applications on the same machine can make client connections and server connections, assuming both the server component and the client component are installed. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 03, 2006 6:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
Only if AntonGolovin doesn't want to use MQCONNX or MQSERVER.
|
I was trying to keep it simple, and not repeat the contents of the Clients manual, but yes - I do agree with all of your comments.
AntonGolovin wrote: |
In the client, I am able to make many queue managers visible |
Do not confuse the Explorer GUI with the client linked with your code. The fact that you can see all the queue managers in the Explorer window has little to do with the client table, which the GUI will assist you with, but you'll still need to configure the client settings independantly of that to use the table. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AntonGolovin |
Posted: Thu Aug 03, 2006 6:58 am Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
There is a thing in the tutorial that has one make the MQSERVER environment variable on the client machine... I was wondering if this is the "table" and if I can put multiple channel entries there, separated by ; ?
Otherwise, could you tell me how to set up this table or how to find more info about it?
Thanks for your help! |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 03, 2006 7:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AntonGolovin wrote: |
Otherwise, could you tell me how to set up this table or how to find more info about it?
|
Whatever you end up doing and whatever method you settle on, the Clients manual is your new best friend. It explains all the various options, including MQSERVER and the table, and how to use them.
For the record, MQSERVER is the other way of setting up a client connection and will only accept a single entry. It's sort of what I was alluding to in the previous post, where you use MQSERVER to connect to a single queue manager & use the queue manager to distribute the traffic out to the other 6 queue managers as required.
As jefflowrey correctly points out there are disadvantages to this method. IMHO (but it is an opinion not holy writ!) they are outweighed by the advantages, but I've seen client tables used very successfully on sites that didn't agree with me
I endorse Jeff's advice unreservedly - read the Application Programming Guide, Clients manual & the Intercommunication Guide. These will inform you both of the procedures you need to follow and the design decisions you need to make.
Have Fun  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|