Compression on a per destination basis requires that all messages sent to a particular destination be compressed using the compression level and strategy specified by the client. Compression support on a per destination basis is provided through enabling compression in the corresponding metadata used to create a destination on the Admin Connection such as in the TopicMetadata and the QueueMetadata classes.
The methods listed below exist in these classes to support compression:
This API enables message compression on a topic/queue using the default compression level and strategy.
This API enables message compression on a topic/queue using the input parameters of the compression level and strategy.
To change the compression level or strategy for messages on the destination on which compression has been enabled, a client application can call upon the setCompressionLevel () and setCompressionStrategy () APIs of the FioranoMessage class, to perform this function. Samples illustrating message compression on a per destination basis are bundled within FioranoMQ. Please refer to the /MessageCompression/PerDestination directory of the /fmq/samples/PubSub and /fmq/samples/PTP directory of the FioranoMQ installation directory/package. It is recommended that these samples should be run to understand the usage of the APIs.
Per Destination Decompression
FioranoMQ handles decompression of messages internally. Client applications do not have to explicitly use any APIs to decompress a compressed message. At runtime, decompression is automatically performed if the message is compressed and then delivered to the message consumers.