Thanks Tim. We are using ICSharpCode (http://www.icsharpcode.net/OpenSource/SharpZipLib/) for end-to-end compression between C#/Java clients using TIBCO EMS.
In any case, does the native ActiveMQ compression provide end-to-end compression between C#/Java clients? If not, how do we get C#/Java clients to exchange compressed messages? Timothy Bish wrote: > > On Tue, 2009-11-24 at 07:55 -0800, jhakim wrote: >> I would like to create a large (40+ MB) MapMessage, get its byte[], >> compress >> the bytes, and send it across the wire as a BytesMessage. On the >> receiving >> side, I would like to read the byte[], uncompress, and create the >> original >> MapMessage from the byte[]. >> >> We have been using this strategy with great success using TIBCO EMS. We >> have >> a mix of clients - Java and C#. >> >> As we look at ActiveMQ as an alternative to TIBCO EMS, I am wondering if >> there is an API that would let us implement the same strategy. >> Specifically, >> is there an API to get the byte[] from a MapMessage and to create a >> MapMessage from a byte[]? >> >> Thanks in advance. > > There's not a direct way of doing this via the NMS API but there are > some tricks that can allow you to get the byte[] from a MapMessage if > you really wanted to. There is another option that might be better that > will be available in the NMS.AcitveMQ 1.2.0 release. You can now set a > property on the Connection instance to enable compression and provide a > CompressionPolicy instance that defines the compression method used to > compress and decompress the body of a Message. By default NMS.ActiveMQ > just uses the GZipStream built into .NET but if you want to actually > trade messages between Java and .NET then you'd need to use something > like the DotNetZip library which provides a ZlibStream class that can > compress and decompress in a format that's compatible with the Java > client's own compression format. > > Regards > Tim. > > -- > Tim Bish > http://fusesource.com > http://timbish.blogspot.com/ > > > > > -- View this message in context: http://old.nabble.com/Creating-message-from-byte---tp26498420p26516611.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.