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

Solution Verified - Updated -


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()


  • Red Hat JBoss A-MQ
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content