Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2658

AMQP message read from page has wrong encode size

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.12.0
    • 2.12.0
    • AMQP, Broker
    • None

    Description

      https://issues.apache.org/jira/browse/ARTEMIS-2617 has introduced a change to save AMQPMessagePersisterV2::decode from re-creating AMQPMessage::extraProperties, but this has introduced a new way to adjust the existing AMQPMessage::extraProperties's TypedProperties::size while decoding the rest of the buffer.
      In the original implementation, the existing AMQPMessage::extraProperties created by AMQPMessagePersister::decode was completely overwritten.

      Page::read can use an offset to search for a specific message in a page and PageSubscriptionImpl is using PagedMessageImpl::getEncodeSize to compute this offset: after a successfull Page::read, AMQPMessagePersisterV2::decode can corrupt the extra properties encode size, making the next message unreachable.

      This can be solved by preserving the original semantic ie overwriting the existing AMQPMessage::extraProperties in order to fix the encode size.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nigro.fra@gmail.com Francesco Nigro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h