Author |
Message
|
techno |
Posted: Wed Jan 22, 2003 2:37 pm Post subject: MQ Client Vs MQ Server |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
What are the advantages/disadvantages if the connection to server is done through client mode and server mode.
Am I right in thinking that connecting as client gives more portability to the application , as it can be run on the m/c with mq server or just mq client?
thanks
Last edited by techno on Thu Mar 24, 2005 10:57 am; edited 1 time in total |
|
Back to top |
|
 |
zpat |
Posted: Thu Jan 23, 2003 1:37 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Properly coded, most MQ applications can be operated using MQ client or MQ Server without change.
The main things to code for are:
1. Make your syncpoint requests explicit.
2. Use MQGET with CONVERT.
3. Re-try the MQCONN if connection breaks (wait for an interval first).
4. Consider reading the queue manager names from an .ini file and attempting to connect to one at random until successful - this can provide automatic load balancing and failover if you have more than one QM.
Points 1 & 2 - This is mainly needed to cope with OS/390 queue managers which have different syncpoint defaults and, of course, character sets from distributed platforms.
As for advantages - I prefer client connection when possible as:
1. No MQSeries license fee.
2. No extra queue manager to administer and monitor.
3. Can be more resilient if you have multiple queue managers.
Generally it's better to invest in a highly available shared queue manager (pair or cluster etc) and use this from all nearby application platforms, than it is to have queue managers installed everywhere. |
|
Back to top |
|
 |
techno |
Posted: Thu Jan 23, 2003 9:36 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
|
Back to top |
|
 |
dotjas |
Posted: Fri Jan 24, 2003 9:25 am Post subject: |
|
|
Novice
Joined: 28 Apr 2002 Posts: 14 Location: Madison, WI
|
Be advised that if you are using Java/JMS, a client connection cannot participate in a Unit of Work. Therefore, the mention of using Syncpoints with a Client connection does bear a qualification. _________________ Jim Schuchardt
Principal Consultant
MQ Certified Specialist |
|
Back to top |
|
 |
sknrt1 |
Posted: Fri Jan 24, 2003 9:48 am Post subject: |
|
|
Apprentice
Joined: 22 Jan 2003 Posts: 39 Location: USA
|
Hi,
MQClient has advantages where ever applicable (no license or maintanence ..).
Also possible to run as client without MQClient software, using MQJMS.
use of MQClient software needs to set the MQSERVE environment variable thry svr_conn channel. By having more no of applications connected to Server from client, more no of svr_conn channels will be running on server. It may exceed the maxactivechannel limit, becoz of no of application threads on client side (this is possible in case of webclients ...)
so, its better to go with MQJMS programming (with client bindings), which works as client with out any channels and MQClient software.
And regarding the transactional aspects its a programming effect to use MQSYNCPOINT or any other facilities (transaction servers).
thanks
 |
|
Back to top |
|
 |
techno |
Posted: Fri Jan 24, 2003 2:12 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Let me be clear on this. In client connection mode, can I not have transactions? If so, shall I be using some other transaction server?
thanks for your info. It is helping me a lot.
Shiva. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Jan 25, 2003 8:05 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
MQClients can have transactions. But MQClients cannot participate in a 2 phase commit where MQ is the XA coordinator.
In other words, an MQClient can GET a message off of a queue under syncpoint, and then commit or roll it back at a later time. However, any database updates must be commited or rolled back by separate means. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
techno |
Posted: Sun Jan 26, 2003 9:13 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
|
Back to top |
|
 |
techno |
Posted: Fri Mar 19, 2004 11:56 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Quote: |
Be advised that if you are using Java/JMS, a client connection cannot participate in a Unit of Work. Therefore, the mention of using Syncpoints with a Client connection does bear a qualification. |
Can I not use one-phase commit with Java/JMS? I know that we do not have two-phase commit.
Thanks |
|
Back to top |
|
 |
vennela |
Posted: Fri Mar 19, 2004 12:54 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
YES, you can do single phase commits with Java/JMS |
|
Back to top |
|
 |
dnaren |
Posted: Sat Mar 27, 2004 11:41 pm Post subject: |
|
|
 Apprentice
Joined: 10 Aug 2001 Posts: 45 Location: Charlotte, NC
|
A single thread in a Client application can connect to multiple queue managers simultaneously.
A thread in a server application cannot connect to more than one queue manager simultaneously. |
|
Back to top |
|
 |
|