Author |
Message
|
wendy |
Posted: Wed Oct 11, 2006 3:53 am Post subject: Issues using an MQ Client Application |
|
|
Apprentice
Joined: 10 Dec 2001 Posts: 47
|
We have a Visual Basic Dll that was using MQ Series (MQServer) .The DLL used a local Queue manager to put request and get responses using server libraries.
The DLL has now been changed to use MQClient and is currently connecting to remote MQ Server.The local Queue Manager will soon be obsolete. This set up has been tested and it works successfully.
The application has at the most about 600 connections at any given time.
We will be doing stress testing shortly and I have increased the MaxActiveChannels on the remote server to 2000.
Are there any settings that need to be configured as to use MQClient optimally? Is there any avaialable documentation highlighting possible perfomance issues that we need to aware of when using MQClient.
I would appreciate any comments or feedback .
Thanks |
|
Back to top |
|
 |
zpat |
Posted: Wed Oct 11, 2006 5:38 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
The main thing is to keep the client-QM connection active. Don't keep re-connecting to the queue manager, and/or keep re-opening the same queues.
600 connections seems a lot, do you really have 600 concurrent threads?
If you do keep the connection active, remember to handle the connection broken condition (MQ RC 2009), this is something that will occur from time to time on client attached applications and not usually on the local ones. |
|
Back to top |
|
 |
wendy |
Posted: Wed Oct 11, 2006 11:22 pm Post subject: |
|
|
Apprentice
Joined: 10 Dec 2001 Posts: 47
|
The QM connection is not continously active.The DLL only connect when doing a put and a get i.e. queue will be reopened.
Please note that the DLL will be spread amongst 3 servers all connecting to one primary remote MQ Server.If the connection is not successfull on the primary QManager then the DLL will connect to a secondary remote queue manager (this was done to increase availabilty of MQ).
The total number of connections for all 3 servers at the most will be 600.
What are your thought on this? Is it possible to optimise this scenerio ? If so how? |
|
Back to top |
|
 |
wendy |
Posted: Wed Oct 11, 2006 11:27 pm Post subject: |
|
|
Apprentice
Joined: 10 Dec 2001 Posts: 47
|
The QM connection is not continously active.The DLL only connect when doing a put and a get i.e. queue will be reopened.
Please note that the DLL will be spread amongst 3 servers all connecting to one primary remote MQ Server.If the connection is not successfull on the primary QManager then the DLL will connect to a secondary remote queue manager (this was done to increase availabilty of MQ).
The total number of connections for all 3 servers at the most will be 600.
What are your thought on this? Is it possible to optimise this scenerio ? If so how? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 11, 2006 11:50 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
wendy wrote: |
What are your thought on this? Is it possible to optimise this scenerio ? If so how? |
The best thing is the suggestion of zpat - keep the connection active. Once you've connected to a queue manager stay connected unless you encounter an error situation; then deal as necessary. IMHO if a client connection to the primary QM breaks (RC 2009) you should make a couple of attempts to reconnect before switching to a alternate. Client connections just break sometimes....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Thu Oct 12, 2006 2:39 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I've come across this issue many times. It depends how the communications module is invoked. If you can arrange for an "initialisation" call separately from the "send message" call, then you should be able to acquire the connections at start up and re-use them.
Managing a pool of connection handles is the ideal way to achieve a controllable balance between resource usage and throughput. Beyond a certain number of concurrent connections, throughput will plateau and may even go down.
You will have to experiment to find the optimum maximum concurrent connection count value. I would suggest maintaining a pool of available connection handles and reusing them if not in use. If these are exhausted then another connection could be obtained and released or the thread could wait for a connection to become available.
Once written (generically) this connection management logic can be re-used for all your MQ client applications (and will also work on a server). |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Oct 12, 2006 3:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Why rewrite the wheel. MQ base gives you a pooling mechanism (at least in java) and if using an app server (J2EE) JMS will pool the connections too.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Thu Oct 12, 2006 3:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Well yes, but the assumption (spot the potential problem! ) is that wendy doesn't want to introduce an app server into her mix or rewrite the existing DLL in Java.
Of course, there's XMS... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Oct 12, 2006 3:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And how would that work with any pool? She still needs to grab a connection hence a rewrite is mandated...
Or do you mean to say that the MQ base pooling API delivered by IBM is only supported in java? _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Thu Oct 12, 2006 3:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
And how would that work with any pool? She still needs to grab a connection hence a rewrite is mandated... |
I propunded reconnection by any means. In my mind that (in VB) would be a simple loop of reconnects not necessarially (but possibly) connected to a pool.
fjb_saper wrote: |
Or do you mean to say that the MQ base pooling API delivered by IBM is only supported in java? |
Not if you're saying it's supported in other languages as well. Never argue with a man who knows....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 12, 2006 3:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I think the ASF are only Java. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|