Hi,

Thanks for taking a look at my question.

I found the compression related info here 
https://qpid.apache.org/releases/qpid-jms-amqp-0-x-6.4.0/jms-amqp-0-8-book/JMS-Client-0-8-Client-Understanding-Connection.html

Even if I can understand your concern about compressing and making sure that 
every client can use it, it still is common practice and helps to get the best 
out your MOM. 

I believe that compression is especially important today where everybody is 
sending JSON or XML text messages.  Because of that, messages have become huge 
and compressing them is a huge performance boost.

Regards

:-) 

-----Message d'origine-----
De : Timothy Bish <[email protected]> 
Envoyé : mardi 1 décembre 2020 20:47
À : [email protected]
Objet : Re: I'm using Qpid JMS 0.55.0 AMQP Java client and I'd like to compress 
the messages I'm sending

On 12/1/20 2:37 PM, KOELMAN Herbert wrote:
> Hello,
>
> I want to compress the messages I'm sending to ARTEMIS 2.15.0. The messages 
> are roughly speaking 9MB big and are sent using a JMS TextMessage instance.
>
> To do so I have created an instance of 
> org.apache.qpid.jms.JmsConnectionFactory using this URL 
> amqp://localhost:5672?messageCompressionThresholdSize=5000&compressMes
> sages=true
>
> JmsConnectionFactory qpidFactory = new 
> JmsConnectionFactory("amqp://localhost:5672?messageCompressionThreshol
> dSize=5000&compressMessages=true");
> ...
>
> When I'm producing messages using this factory, the messages are not 
> compressed.
>
> Where did I go wrong ?
>
> Cordialement
>
> Herbert
>
> Design and programming are human activities; forget that and all is lost.
>
> Bjarne Stroustrup
>
>
The Qpid JMS client does not support any sort of message compression so I'm 
guessing you got those URI options from some Artemis Core (JMS) client 
documentation which explains why they don't produce any compressed output by 
the client.

Performing message compression from within a client is often bound to cause 
issues due to the need for every intermediary within the transmission chain 
that might need to touch the message to understand what kind of compression is 
used if any and how to decompress and then compress again depending on 
transformations etc.  Issues can arise for instance when crossing between the 
various protocol clients that might be consuming messages from the Artemis 
broker.

The best strategy here might be for you to use a BytesMessage as your means of 
sending they bytes that you compress yourself so that you can control the 
decompression on the receiving ends as needed.


--
Tim Bish


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to