I'm using Qpid JMS 0.55.0 AMQP Java client and I'd like to compress the messages I'm sending

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

I'm using Qpid JMS 0.55.0 AMQP Java client and I'd like to compress the messages I'm sending

KOELMAN Herbert
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&compressMessages=true

JmsConnectionFactory qpidFactory = new JmsConnectionFactory("amqp://localhost:5672?messageCompressionThresholdSize=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

Reply | Threaded
Open this post in threaded view
|

Re: I'm using Qpid JMS 0.55.0 AMQP Java client and I'd like to compress the messages I'm sending

Timothy Bish
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&compressMessages=true
>
> JmsConnectionFactory qpidFactory = new JmsConnectionFactory("amqp://localhost:5672?messageCompressionThresholdSize=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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: I'm using Qpid JMS 0.55.0 AMQP Java client and I'd like to compress the messages I'm sending

KOELMAN Herbert
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 <[hidden email]>
Envoyé : mardi 1 décembre 2020 20:47
À : [hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]


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

Reply | Threaded
Open this post in threaded view
|

Re: I'm using Qpid JMS 0.55.0 AMQP Java client and I'd like to compress the messages I'm sending

Robbie Gemmell
Administrator
That link is for the older AMQP 0-x based client, which is a
completely separate client, hence its quite distinct documentation /
version / factory etc. To my knowledge that client functionality only
works with Qpid Broker-J (if enabled there also) for some of the
reasons Tim covered, and so would be of no assistance in this case
given your use of Artemis anyway. Not that the two can talk to each
other either, given Artemis supports AMQP 1.0 only.

As Tim said, the AMQP 1.0 JMS client does not support any form of
compression (neither does Artemis for AMQP 1.0 clients). There are no
immediate plans to make it do so. If you want to compress the message
content you will need to do so in your application or framework.

On Wed, 2 Dec 2020 at 08:54, KOELMAN Herbert
<[hidden email]> wrote:

>
> 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 <[hidden email]>
> Envoyé : mardi 1 décembre 2020 20:47
> À : [hidden email]
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

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

Reply | Threaded
Open this post in threaded view
|

RE: I'm using Qpid JMS 0.55.0 AMQP Java client and I'd like to compress the messages I'm sending

KOELMAN Herbert
Got it, thanks for the infos.

Regards

-----Message d'origine-----
De : Robbie Gemmell <[hidden email]>
Envoyé : mercredi 2 décembre 2020 10:21
À : users <[hidden email]>
Objet : Re: I'm using Qpid JMS 0.55.0 AMQP Java client and I'd like to compress the messages I'm sending

That link is for the older AMQP 0-x based client, which is a completely separate client, hence its quite distinct documentation / version / factory etc. To my knowledge that client functionality only works with Qpid Broker-J (if enabled there also) for some of the reasons Tim covered, and so would be of no assistance in this case given your use of Artemis anyway. Not that the two can talk to each other either, given Artemis supports AMQP 1.0 only.

As Tim said, the AMQP 1.0 JMS client does not support any form of compression (neither does Artemis for AMQP 1.0 clients). There are no immediate plans to make it do so. If you want to compress the message content you will need to do so in your application or framework.

On Wed, 2 Dec 2020 at 08:54, KOELMAN Herbert <[hidden email]> wrote:

>
> Hi,
>
> Thanks for taking a look at my question.
>
> I found the compression related info here
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fqpid
> .apache.org%2Freleases%2Fqpid-jms-amqp-0-x-6.4.0%2Fjms-amqp-0-8-book%2
> FJMS-Client-0-8-Client-Understanding-Connection.html&amp;data=04%7C01%
> 7Cherbert.koelman%40soprasteria.com%7C60d993b83fa74191f46b08d896a3a60b
> %7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637424976903239779%7CUnk
> nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWw
> iLCJXVCI6Mn0%3D%7C1000&amp;sdata=2EKP4WEpQAhFY9v8wAtWEvLGlftTYZ5DoGA1D
> %2BxC7Ek%3D&amp;reserved=0
>
> 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 <[hidden email]> Envoyé : mardi 1 décembre 2020
> 20:47 À : [hidden email] 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&compressM
> > es
> > sages=true
> >
> > JmsConnectionFactory qpidFactory = new
> > JmsConnectionFactory("amqp://localhost:5672?messageCompressionThresh
> > ol
> > 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: [hidden email] For
> additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email] For
> additional commands, e-mail: [hidden email]
>

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


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