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

AMQP Journal loading is triggering reencode

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.12.0
    • 2.12.0
    • Broker
    • None

    Description

      The journal loading is seeing AMQP messages to be fully decoded while they shouldn't not; it seems causes by AMQPStandardMessage:: reloadPersistence:

         @Override
         public void reloadPersistence(ActiveMQBuffer record, CoreMessageObjectPools pools) {
            int size = record.readInt();
            byte[] recordArray = new byte[size];
            record.readBytes(recordArray);
            data = ReadableBuffer.ByteBufferReader.wrap(ByteBuffer.wrap(recordArray));
      
            // Message state is now that the underlying buffer is loaded, but the contents not yet scanned
            resetMessageData();
            modified = false;
            messageDataScanned = RELOAD_PERSISTENCE;
            // can happen when moved to a durable location.  We must re-encode here to
            // avoid a subsequent redelivery from suddenly appearing with a durable header
            // tag when the initial delivery did not.
            if (!isDurable()) {
               setDurable(true);
               reencode();
            }
         }
      

      Specifically by:

            if (!isDurable()) {
               setDurable(true);
               reencode();
            } 
      

      This code path shouldn't really be taken so need some investigation to understand what's going on.

      Attachments

        Issue Links

        Activity

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

          People

            Unassigned Unassigned
            nigro.fra@gmail.com Francesco Nigro
            Votes:
            0 Vote for this issue
            Watchers:
            1 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 - 1h
                1h

                Slack

                  Issue deployment