Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Messages : Message Compression

Message Compression
TIBCO Enterprise Message Service allows a client to compress the body of a message before sending the message to the server. EMS supports message compression/decompression across client types (Java, C and C#). For example, a Java producer may compress a message and a C consumer may decompress it.
Message compression is supported in .NET clients when using the install package for Visual C++ 8 / .NET 2.0. .NET in the Visual C++ 7 / .NET 1.1 package does not support compression.
About Message Compression
Message compression is especially useful when messages will be stored on the server (persistent queue messages, or topics with durable subscribers). Setting compression ensures that messages will take less memory space in storage. When messages are compressed and then stored, they are handled by the server in the compressed form. Compression assures that the messages will usually consume less space on disk and will be handled faster by the EMS server.
The compression option only compresses the body of a message. Headers and properties are never compressed. It is best to use compression when the message bodies will be large and the messages will be stored on a server.
When messages will not be stored, compression is not as useful. Compression normally takes time, and therefore the time to send or publish and receive compressed messages is generally longer than the time to send the same messages uncompressed. There is little purpose to message compression for small messages that are not be stored by the server.
Setting Message Compression
Message compression is specified for individual messages. That is, message compression, if desired, is set at the message level. TIBCO Enterprise Message Service does not define a way to set message compression at the per-topic or per-queue level.
To set message compression, the application that sends or publishes the message must access the message properties and set the boolean property JMS_TIBCO_COMPRESS to true before sending or publishing the message.
Compressed messages are handled transparently. The client code only sets the JMS_TIBCO_COMPRESS property. The client does not need to take any other action. The client automatically decompresses any compressed messages it receives.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved