Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2929

Compressed text message received by consumer uncompressed

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.3.2
    • 5.5.0
    • Broker
    • None
    • ActiveMQ 5.3.2 / Camel 2.2.0

    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.

      Attachments

        1. ActiveMQConsumerTest.java
          0.5 kB
          Michael Chen
        2. ActiveMQConsumerTest.xml
          3 kB
          Michael Chen
        3. ActiveMQProducerTest.java
          0.9 kB
          Michael Chen
        4. ActiveMQProducerTest.xml
          2 kB
          Michael Chen

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tabish Timothy A. Bish
            mwc_tonesoft Michael Chen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment