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

ActiveMQBytesMessage fails to set 'compressed=false' following restoration of compressed message content

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.13.2
    • 5.13.3, 5.14.0
    • JMS client
    • Patch Available

    Description

      ActiveMQBytesMessage does not reset its compressed flag to false following the restoration of compressed message content in restoreOldContent(). This becomes a problem if an ActiveMQBytesMessage is reused by a client on an uncompressed connection after originally being published on a compressed connection.

      Steps to reproduce:

      1. An ActiveMQBytesMessage is published by a producer on a connection with compression enabled
        Message State: compressed=true; content=compressed
      2. The message is consumed by a client and republished on a connection with compression disabled
        Message State: compressed=true; content=uncompressed
      3. The message is consumed by a client and its contents are read. The ActiveMQ client library tries to decompress the message content, but fails because the content is not compressed. This causes the consumer to throw either a DataFormatException or NegativeArraySizeException.

      This JIRA is similar in nature to AMQ-5381.

      I'll submit a pull request with a test to reproduce and a patch shortly.

      Attachments

        Activity

          People

            cshannon Christopher L. Shannon
            brianjohnson Brian D. Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: