You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/03/31 22:26:00 UTC

[GitHub] [activemq-artemis] clebertsuconic edited a comment on issue #3044: ARTEMIS-2676 PageCursorProviderImpl::cleanup can save decoding pages without large messages

clebertsuconic edited a comment on issue #3044: ARTEMIS-2676 PageCursorProviderImpl::cleanup can save decoding pages without large messages
URL: https://github.com/apache/activemq-artemis/pull/3044#issuecomment-606911209
 
 
   I could fix the rebasing, however your implementation is not valid.
   
   Up until CoreMessages, we used a special record type on paging, only used for Large Messages.
   
   With AMQP, I didn't use that record at all. instead I used the Persister from the AMQP Protocol. So, you would have to check the Persister Type, at the proper record position.
   
   Besides, the following implementation is not self documented... if things change this will likely introduce bugs (lack of encapsulation of this rule):
   
   ```
      public static boolean isLargeMessage(ActiveMQBuffer buffer) {
         // skip transactionID
         final boolean isLargeMessage = buffer.getByte(buffer.readerIndex() + Long.BYTES) != 0;
         return isLargeMessage;
      }
   ```
   
   
   You would need to encapsulate this through PagePosition for Core Records, or check the Persister, and do the proper encapsulation if you really want to implement such feature.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services