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

AMQP Journal loading is triggering reencode

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.12.0
    • Fix Version/s: 2.12.0
    • Component/s: Broker
    • Labels:
      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

              People

              • Assignee:
                Unassigned
                Reporter:
                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