Author |
Message
|
GeordieBri |
Posted: Thu Feb 05, 2009 6:08 am Post subject: MQ client/server relationship |
|
|
Newbie
Joined: 05 Feb 2009 Posts: 8
|
Hi, newbie 1st post etc. etc.
I have MQServer on a Windows Server 2003 64bit, and MQClient on my Windows XP 32bit. Both of these machines are on the same LAN, so in terms of networking, they can 'see' each other.
How do I establish an 'MQ relationship' between these two PCs, such that I can access the queues on the Server, from my Client?
Thanks! |
|
Back to top |
|
 |
exerk |
Posted: Thu Feb 05, 2009 6:10 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Welcome to the Board, at which point I shall point you to the Intercommunication Manual as a good place to start. Also, the Quick Beginnings Manual for your platform has a section on how to verify a Server and Client install. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 05, 2009 6:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You write an MQ program that establishes an MQ connection using the information about where the MQ Server lives on the network, and you build that program against the MQ client libraries.
There's no formal "register this client with this server". |
|
Back to top |
|
 |
zpat |
Posted: Thu Feb 05, 2009 6:25 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 05, 2009 6:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
You write an MQ program that establishes an MQ connection using the information about where the MQ Server lives on the network, and you build that program against the MQ client libraries. |
mqjeff wrote: |
There's no formal "register this client with this server". |
Except in so far as your client code must be authorised to access the queue manager resources, if queue manager security is enabled. It's possible the queue manager has security enabled, but client connections have been given generic access to various facilities (known in the trade as MCAUSER).
Write your code as above and try it. If you get a 2035 ask your MQ Admin how the security works at your site.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
masteringmq |
Posted: Thu Feb 05, 2009 7:46 am Post subject: |
|
|
Master
Joined: 20 Oct 2008 Posts: 200
|
MQ client has no queue manager. Therefore you need to build a client connection table. Using the information in the client connection table MQ client will connect to the MQ server via a server connection. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 05, 2009 7:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
masteringmq wrote: |
MQ client has no queue manager. |
This is true.
masteringmq wrote: |
Therefore you need to build a client connection table. |
This is not true. You *can* use a client connection table. You do not *need* to.
masteringmq wrote: |
Using the information in the client connection table MQ client will connect to the MQ server via a server connection. |
This is true. If you use a CCDT, then the information in the CCDT will be used by the MQClient. And MQClients always connect via a Server Connection channel/Client Connection channel pair. |
|
Back to top |
|
 |
masteringmq |
Posted: Thu Feb 05, 2009 7:52 am Post subject: |
|
|
Master
Joined: 20 Oct 2008 Posts: 200
|
In my company we always build a client connection table. It's good to that the client connection table is optional.  |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 05, 2009 7:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
masteringmq wrote: |
It's good to that the client connection table is optional.  |
But there are potentially solid reasons why your site is using this method. Do not abandon it without checking.
You'll find useful information (unsurprisingly) in the Clients manual. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Thu Feb 05, 2009 8:00 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
It's generally better to use a CCDT.
Depends to an extent on the language the client application uses.
Java and .Net programs tend to specify connection details themselves (but make sure this is not hard-coded). |
|
Back to top |
|
 |
masteringmq |
Posted: Thu Feb 05, 2009 8:04 am Post subject: |
|
|
Master
Joined: 20 Oct 2008 Posts: 200
|
When more information need to be specified then we use a client connection table. The other way is you can do it manually by putting the hostname and server-connection channel name in the Add Queue Manager wizard. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 05, 2009 8:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
masteringmq wrote: |
When more information need to be specified then we use a client connection table. |
Examples please (for the benefit of the wider community).
masteringmq wrote: |
The other way is you can do it manually by putting the hostname and server-connection channel name in the Add Queue Manager wizard. |
Another way, not the other way. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
masteringmq |
Posted: Thu Feb 05, 2009 8:13 am Post subject: |
|
|
Master
Joined: 20 Oct 2008 Posts: 200
|
For example using SSL with a client channel definition table. |
|
Back to top |
|
 |
GeordieBri |
Posted: Thu Feb 05, 2009 8:13 am Post subject: |
|
|
Newbie
Joined: 05 Feb 2009 Posts: 8
|
Thanks for all the info so far!
My MQServer has a Queue Manager, and all status fields show 'running' and 'connected', so I can be pretty certain the Queue Manager is OK.
Under the Queue Manager, I've got a Queue. Not a lot more to say on that.
Then I've got some Channels. The first is a 'Server-connection' with status 'Inactive'. The second is a 'Cluster-receiver' with status again 'Inactive'. The third is a 'Cluster-sender', with status 'Retrying' - I'm not too concerend about this last one, it appears to be configured with a host address that I know does not exist.
So that's my MQServer on a Windows 2003 box.
Then, on my XP machine (same LAN), I'm writing a bit of C# to attempt to connect to the MQServer Queue Manager/Queue/Channel. No matter what I've tried so far, I always get (in response to MQQueueManager ctor) an MQException, with ReasonCode 2059.
1. Should I be concerned that my Channel statuses are 'Inactive'?
2. Is my Channel configuration essentially correct for what I'm trying to achieve?
3. ReasonCode 2059 suggests the MQServer Queue/Channel I'm attempting to access does not exist, or is not running, or something else - what should I do to investigate further?
Thanks again!
Last edited by GeordieBri on Thu Feb 05, 2009 8:15 am; edited 1 time in total |
|
Back to top |
|
 |
masteringmq |
Posted: Thu Feb 05, 2009 8:15 am Post subject: |
|
|
Master
Joined: 20 Oct 2008 Posts: 200
|
The server connection channel will change to a running state when an application makes a connection. Otherwise the status will be Inactive. |
|
Back to top |
|
 |
|