Uploaded image for project: 'Queued Asynchronous Activation over RabbitMQ'
  1. Queued Asynchronous Activation over RabbitMQ
  2. QAARQ-41

Improper ACK with Exception handling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.9
    • 1.8
    • connector
    • None
    • Magnolia 6.2, local RMQ, macOS

    Description

      Steps to reproduce

      1. Install and configure the module (as in the example configuration: https://docs.magnolia-cms.com/magnolia-rabbitmq/rmq-setup-example.html)
      2. Set improper server public key (/server/activation@publicKey) on the public instance
      3. Publish a new/updated page
      4. Observe author instance logs
      5. Set the proper server public key (/server/activation@publicKey) on the public instance
      6. Publish the second new/updated page
      7. Observe author instance logs

      Expected results

      No errors, the first page is marked as not published and the second page is marked as published 

      Actual results

      Publisher instance errors. Both pages are not marked as published

      Workaround

      The custom class which inherit from ConfirmationConsumer class with bugfix

      Cause

      (based on decompiled source, line numbers may be wrong)
      In ConfirmationConsumer class on line 80 you call 

      ackMap.keys(); 

      which, when ackMap is null, throws NullPointerException. I suggest changing it to:

      if(ackMap != null) {
        Iterator<String> keysIt = ackMap.keys();
        if (keysIt.hasNext()) {
          ... 

      (see attached screens for more detailed info)

      ackMap is null when message body is '[]', which is ok-ish when public instance exception thrown

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              rgange Richard Gange
              bgorski Bartosz Gorski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

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