Solace Message Compression

Monali
Monali Member Posts: 2
edited January 2022 in PubSub+ Event Broker #1

Hi Team,

I need some help with solace message compression.In our solace broker the maximum message size is configured as 10MB.So I used the below property to compress the message :

message.setIntProperty(SupportedProperty.SOLACE_JMS_COMPRESSION_LEVEL, 9);

As of now we don't have a specific broker to publish compressed message.So is there any way we can compress the message and publish to solace.

Best Answer

  • uherbst
    uherbst Member, Employee Posts: 127 Solace Employee
    #2 Answer ✓

    yes, that was exactly what I had in my mind.

Answers

  • uherbst
    uherbst Member, Employee Posts: 127 Solace Employee

    Hi @Monali,

    Message compression is only about compression during transfer (that is between your client and the broker).

    In the broker itself, the message is always un-compressed - and therefor the uncompressed message size is relevant for maximum message size.

    You can compress your payload on publisher side and un-compress on consumer side, but this is outside the Solace API.


    And to answer the question: "Why does the broker handle only uncompressed messages ?"

    Solace broker do protocol translation - and some clients have compressed SMF as protocol, some clients have uncompressed REST or uncompressed MQTT ...

    The only way to handle that fast with low latency is to handle only uncompressed messages.


    Uli

  • Monali
    Monali Member Posts: 2

    Thanks @uherbst for responding so quickly

    "You can compress your payload on publisher side and un-compress on consumer side, but this is outside the Solace API."

    We are using sol-jms api,may be my question would be very basic but have few queries on the same:

    So I can compress the payload using GZIP and publish the message as BytesMessage.Can we proceed with such approach.

  • uherbst
    uherbst Member, Employee Posts: 127 Solace Employee
    #5 Answer ✓

    yes, that was exactly what I had in my mind.