Enabling Channel Compression for a Session
Valid values for the compression level to be applied to messages published by a client are 0 (no compression), or 1 through 9 (where 1 offers the least amount of compression and fastest data throughput, and 9 offers the most compression and slowest data throughput). The default value is 0. The compression value should be adjusted according to particular network requirements and the performance required.
PubSub+ Messaging API | Use |
---|---|
JCSMP |
JCSMPChannelProperties.setCompressionLevel(...) |
Java RTO |
SessionHandle.PROPERTIES.COMPRESSION_LEVEL |
C |
SOLCLIENT_SESSION_PROP_COMPRESSION_LEVEL |
.NET |
SessionProperties.CompressionLevel |
Node.js |
SessionProperties.CompressionLevel |
JavaScript | Not applicable (compression not supported) |
Related Samples
For an example of how to enable channel compression, refer to the DirectPubSub
sample for the appropriate messaging API.