gaohoward commented on a change in pull request #2579: ARTEMIS-2273 Adding 
Audit Log
URL: https://github.com/apache/activemq-artemis/pull/2579#discussion_r264963623
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
 ##########
 @@ -1516,6 +1541,9 @@ public synchronized RoutingStatus send(Transaction tx,
                                           final boolean direct,
                                           boolean noAutoCreateQueue,
                                           RoutingContext routingContext) 
throws Exception {
+      if (AuditLogger.isEnabled()) {
+         AuditLogger.sendMessage(this, getUsername(), tx, messageParameter, 
direct, noAutoCreateQueue, routingContext);
 
 Review comment:
   > Shouldn't this be done on PostOfficeImpl::send?
   > 
   > Then the same would apply to all the protocols.
   > 
   > Currently your implementation would ignore anything coming from 
Federation, MQTT AMQP or Stomp, since those will call PostOfficeImpl::send 
directly.
   
   The send() is auditing the message coming into the broker. So I think it can 
cover other protocols. right? (currently the audit doesn't record the messages 
going out but it logs the consumer creations).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to