activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiram Chirino <>
Subject Re: MQTT To JMS: Payload (de)compression
Date Wed, 24 Feb 2016 12:55:58 GMT
One way to do it would be to copy the message.  The body on the message
copy should be writable.

On Wednesday, February 24, 2016, davyv <>

> I'm working on a project where I connect clients over MQTT and subscribers
> over JMS to an activeMQ instance.
> For saving data (Wireless 3G) over the MQTT connection, I am compressing
> the
> data in the MQTT client. And now I'm trying to figure out a way to
> decompress the data.
> I was looking to create a custom decompression interceptor to deploy into
> the activeMQ instance, however I ran into some issues. I override the
> 'send'
> method from the BrokerFilter. And try to replace the content with a
> decompressed bytearray.
> And the activeMQ configuration:
> I keep getting the exception that the message (BytesMessage) body is
> write-only, so I'm unable to read the content
> ('bytesMessage.readBytes(buffer)').
> Is an interceptor in activeMQ the best option for this? And how would this
> best be implemented? Does activeMQ have anything else for this? Or is the
> JMS client a better option?
> If a use an interceptor? When exactly is this executed? Are there charts
> that show the flow of an interceptor? What happens when implementing more
> than one interceptor? What is the order that they are called?
> As far as I can find in the specs, MQTT does not have an option in the
> protocol to compress the connection. However if anyone knows a standard
> option for this.
> --
> View this message in context:
> Sent from the ActiveMQ - Dev mailing list archive at

Hiram Chirino
Engineering | Red Hat, Inc. | |
skype: hiramchirino | twitter: @hiramchirino

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message