activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Strasheim <>
Subject Re: ACTIVEMQ-CPP Compression zlib
Date Wed, 06 Aug 2008 23:08:17 GMT


alkatal wrote:
> Hi im compressing a 6mb Textmessage using java ActiveMq. Compression works
> fine file is 204kb :)
> Prob is that ActiveMq-cpp does not support compression and i need to know
> wich kind of algorithm i have to use in c++ to decompress the TextMessage.
> Zlib, Xstream c++?

I haven't looked at AMQCPP in a while, so maybe there is a better way to do

My idea: You might consider sending a BytesMessage instead.

I think it would work something like this:

1. Build a chain of streams ending in a GZIPOutputStream wrapped around a
2. Write to this stream.
3. Extract the compressed contents as a byte[] by calling toByteArray().
4. Put the resulting byte[] inside a BytesMessage.
5. Send the message to the C++ client.
6. Get the buffer from the BytesMessage on the C++ side and call the zlib C

Hope this helps.



View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message