Description
When compression is turned on and the ActiveMQBytesMessage is used, the following exception will be encountered:
java.lang.NullPointerException: Deflater has been closed
at java.util.zip.Deflater.ensureOpen(Deflater.java:427)
at java.util.zip.Deflater.deflate(Deflater.java:305)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:159)
at java.util.zip.DeflaterOutputStream.finish(DeflaterOutputStream.java:134)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)
at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
at org.apache.activemq.command.ActiveMQBytesMessage$1.close(ActiveMQBytesMessage.java:808)
at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
at org.apache.activemq.command.ActiveMQBytesMessage.storeContent(ActiveMQBytesMessage.java:124)
at org.apache.activemq.command.ActiveMQBytesMessage.copy(ActiveMQBytesMessage.java:109)
at org.apache.activemq.command.ActiveMQBytesMessage.copy(ActiveMQBytesMessage.java:104)
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1735)
at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)