Francesco Nigro created ARTEMIS-2658:
----------------------------------------

             Summary: AMQP message read from page has wrong encode size
                 Key: ARTEMIS-2658
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2658
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: AMQP, Broker
    Affects Versions: 2.11.0
            Reporter: Francesco Nigro


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.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to