[QAARQ-41] Improper ACK with Exception handling Created: 30/May/23  Updated: 06/Jun/23  Resolved: 05/Jun/23

Status: Closed
Project: Queued Asynchronous Activation over RabbitMQ
Component/s: connector
Affects Version/s: 1.8
Fix Version/s: 1.9

Type: Bug Priority: Major
Reporter: Bartosz Gorski Assignee: Richard Gange
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.75h
Original Estimate: Not Specified
Environment:

Magnolia 6.2, local RMQ, macOS


Attachments: PNG File Screenshot 2023-05-30 at 17.13.03.png     PNG File Screenshot 2023-05-30 at 17.13.44.png     PNG File Screenshot 2023-05-30 at 17.14.28.png    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 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



 Comments   
Comment by Richard Gange [ 05/Jun/23 ]

Hello bgorski-

Version 1.9 has been released with code changes you suggested. Please update when you can.

Cheers
Rich

Comment by Bartosz Gorski [ 06/Jun/23 ]

Thank you Richard! I will check it later today

Generated at Mon Feb 12 10:39:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.