gemmellr commented on code in PR #6047:
URL: https://github.com/apache/activemq-artemis/pull/6047#discussion_r2518912719


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java:
##########
@@ -1733,8 +1734,16 @@ public void acknowledge(final Transaction tx, final 
MessageReference ref, final
          if (AuditLogger.isMessageLoggingEnabled()) {
             // it's possible for the consumer to be null (e.g. acking the 
message administratively)
             final ServerSession session = consumer != null ? 
server.getSessionByID(consumer.getSessionID()) : null;
-            final Subject subject = session == null ? null : 
session.getRemotingConnection().getSubject();
-            final String remoteAddress = session == null ? null : 
session.getRemotingConnection().getRemoteAddress();
+            final Subject subject;
+            final String remoteAddress;
+            if (session == null) {
+               subject = new Subject();
+               subject.getPrincipals().add(new UserPrincipal("management"));
+               remoteAddress = "internal";

Review Comment:
   Mostly still feel the same comment applies after the change, since you 
changed 'management' to 'system' but then simultaneously changed 'internal' to 
'management'. Personally I would avoid including the word management in this 
case given its entirely separate from the the brokers management interfaces.
   
   Could it just be blank given there is actually no address?
   
   Or, more directly on the nose option, "expiry"?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to