Author |
Message
|
dpkmq |
Posted: Thu May 17, 2007 7:03 am Post subject: Application compression Vs MQ Compression |
|
|
Newbie
Joined: 17 May 2007 Posts: 5
|
What is the best design to compress messages . Is it better to be done at the application end or at the mq channel ?
If using compression in the application , what is the best method . I see java mq api allows compression . Is similar api is available with JMS to compress and send the data ? What are the other options ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 17, 2007 8:35 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What is the goal of the compression? What are the requirements?
These drive the design. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
dpkmq |
Posted: Thu May 17, 2007 10:05 am Post subject: |
|
|
Newbie
Joined: 17 May 2007 Posts: 5
|
The requirement is to send large amount of a data from a java application to another java application through MQ . The no of messages are very high and each message is very big. The Java application is connecting to mq in client mode. What is the best design to achieve maximum performance. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 17, 2007 10:17 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
dpkmq wrote: |
The requirement is to send large amount of a data from a java application to another java application through MQ . The no of messages are very high and each message is very big. The Java application is connecting to mq in client mode. What is the best design to achieve maximum performance. |
Simple answer is use always compression because sent data is smaller.
But how about compression process ?
Processor will have to do compression.
As you mentioned your messages are very big, so it will take time and your resources.
We don't know your architecture, network, machines.
I would recommend stress tests. _________________ Marcin |
|
Back to top |
|
 |
dpkmq |
Posted: Thu May 17, 2007 11:00 am Post subject: |
|
|
Newbie
Joined: 17 May 2007 Posts: 5
|
Thanks Marcin. I know the compression will improve performance on a low network for large messages. I like to know what are the factors to consider to decide between compressing done by java application and that done by MQ. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 17, 2007 11:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The time spent to compress and uncompress may outweigh the gain in the channel communciations.
I don't believe that MQ does compression on client connections. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 17, 2007 11:40 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
dpkmq wrote: |
Thanks Marcin. I know the compression will improve performance on a low network for large messages. I like to know what are the factors to consider to decide between compressing done by java application and that done by MQ. |
It was little digression.
Back to the subject.
In my opinion it is better to let MQ to do it.
But as I mentioned ealier it is better to prepare stress tests.
What you can do ...
A WebSphere MQ base Java application specifies the techniques that can be used for compressing header or message data on a client connection.
In your JAVA app you have to tell QMGR to turn compression (header , data or both) .
If QMGR accepts it during negotiation, compression will be used during communication.
Code: |
...
Collection msgComp = new Vector();
msgComp.add(new Integer(MQC.MQCOMPRESS_RLE));
msgComp.add(new Integer(MQC.MQCOMPRESS_ZLIBHIGH));
MQEnvironment.msgCompList = msgComp;
MQQueueManager qMgr = new MQQueueManager(QM);
..
|
Another this is turning on compression between channels (COMPMSG and COMPHDR channel attribute) _________________ Marcin
Last edited by marcin.kasinski on Thu May 17, 2007 12:15 pm; edited 1 time in total |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 17, 2007 11:46 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
jefflowrey wrote: |
The time spent to compress and uncompress may outweigh the gain in the channel communciations.
I don't believe that MQ does compression on client connections. |
Exactly.
That's why I recommend stress tests. _________________ Marcin |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 17, 2007 11:55 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
jefflowrey wrote: |
I don't believe that MQ does compression on client connections. |
Now I'm little confused
Are you sure ?
I think my example above refers to client connection.
Am I right ? _________________ Marcin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 17, 2007 12:00 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I didn't think COMPHDR and etc. were valid on SVRCONNS.
I guess I'm wrong. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 17, 2007 5:34 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
The time spent to compress and uncompress may outweigh the gain in the channel communciations.
I don't believe that MQ does compression on client connections. |
So why are the compression attributes on the SVRCONN channel definition??
Agreed it may only work if you use a channel table....
The standard status display shows compression as none,none when not using the channel table....  _________________ MQ & Broker admin |
|
Back to top |
|
 |
dpkmq |
Posted: Fri May 18, 2007 1:33 pm Post subject: |
|
|
Newbie
Joined: 17 May 2007 Posts: 5
|
|
Back to top |
|
 |
|