useCompression fails for binaries, Apache NMS Exception "Bad state"

Solution Verified - Updated -

Issue

We are facing trouble in connecting a Java Producer with a .Net consumer while using the parameter:
- jms.useCompression=true in Java and
- connection.useCompression=true in .Net/ApacheNMS

The consumer is unable to decompress some but not all binary files with this exception:

Bad state (incorrect data check)
at Ionic.Zlib.InflateManager.Inflate(FlushType flush)
at Ionic.Zlib.ZlibCodec.Inflate(FlushType flush)
at Ionic.Zlib.ZlibBaseStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Ionic.Zlib.ZlibStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.BinaryReader.Read(Byte[] buffer, Int32 index, Int32 count)
at Apache.NMS.ActiveMQ.Commands.ActiveMQBytesMessage.get_Content()

Environment

  • Red Hat JBoss A-MQ
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.