Details
Description
I have a queue setup to send and consume compressed text messages. This is done via Spring setting ActiveMQConnectionFactory.useCompression to true. If the consumer connects to this queue before the first message is arrives, everything works great.
If the messages are sent to this queue before the consumer connects, those early messages will cause ZipException "unknown compression method" when consumed by the belated consumer. Debugger shows that the ActiveMQTextMessage.content already contains the uncompressed text (with 4 leading length bytes) when ActiveMQTextMessage.getText() is called.
If I set useCompression to false, early messages are consumed with no problems. Please look into this.
I notice that after ActiveMQTextMessage.getText() decompress the message, it does not set compressed to false. Not sure if that is the cause.