Solace message compression

sysem
sysem Member Posts: 15

How can i check if the message is compressed??
Q1. if i connect solace session with the compressed port , then all messages send out would be compressed ??

Q2. if i connect solace session with normal port (no compression), can i manually set the compression level in solace session property instead ?? So that all messages sent out / receive by the solace session would be compressed ??

Q3. In case the solace session property's compression level is non-zero (e.g. 9), then is the solace session able to receive non-compressed message ??

Q4. How can i check if the message can be compressed successfully ?
I have tried to set the compression level to 9 or connect to solace port (compression on) and try to send out message to a durable queue.
When i observe the spooled message size in solAdmin, seems it is the same when i disable the compression level (0) or connect to solace port (compression OFF)..

Comments

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee

    Hi @sysem,
    One by one:
    Q1: Yes. Solace compression is stream based, so the entire stream is compressed and not just the message payload.
    Q2: I'm not sure if setting the compression level session property will result in an error, but the basic idea is only set the compression level if you connect to the compressed port. You'll end up getting an error somewhere along the line otherwise.
    Q3: Yes, but this relies on connecting to the compressed port on the broker.
    Q4: Compression/de-compression occurs in the API once send is called, and at the broker on ingress/egress. In other words, messages have to be de-compressed before they can be processed. To see details of the compressed vs uncompressed rates, the CLI command show client <client name> stats detaillists this for you.

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 526 admin

    To summarize: compression is only on the network connection between the API and the broker. Messages are automatically uncompressed on either side for processing. So messages "inside" the broker and the API are always uncompressed. Compression is designed to save network bandwidth, and improve overall throughput on long WAN / high RTT links.