You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2022/10/12 10:05:16 UTC

[GitHub] [activemq-artemis] andytaylor commented on a diff in pull request #4183: ARTEMIS-3875 - adding consumer and producer metrics

andytaylor commented on code in PR #4183:
URL: https://github.com/apache/activemq-artemis/pull/4183#discussion_r993260431


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AbstractControl.java:
##########
@@ -50,8 +51,15 @@ public AbstractControl(final Class<?> clazz, final StorageManager storageManager
       this.storageManager = storageManager;
    }
 
+   public long getLastDeliveredTimeElapsed(ServerConsumer consumer) {
+      long currentTime = System.currentTimeMillis();
+      return consumer.getLastDeliveredTime() == 0 ? 0 : currentTime - consumer.getLastDeliveredTime();

Review Comment:
   Ive reverted to just passing back the current time as per @gtully suggested



##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java:
##########
@@ -506,8 +510,10 @@ public void proceedDeliver(MessageReference reference) throws Exception {
             // The deliverer was prepared during handle, as we can't have more than one pending large message
             // as it would return busy if there is anything pending
             largeMessageDeliverer.deliver();
+            //lastDeliveredTime = System.currentTimeMillis();

Review Comment:
   fixed



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org