diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java index 2add0c3937a..7fd93879cda 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java @@ -2299,14 +2299,6 @@ static void createCoreSession(Object source, Object... args) { @Message(id = 601267, value = "User {0} is creating a core session on target resource {1} {2}", format = Message.Format.MESSAGE_FORMAT) void createCoreSession(String user, Object source, Object... args); - static void getProducedRate(Object source) { - LOGGER.getProducedRate(getCaller(), source); - } - - @LogMessage(level = Logger.Level.INFO) - @Message(id = 601268, value = "User {0} is getting produced message rate on target resource: {1} {2}", format = Message.Format.MESSAGE_FORMAT) - void getProducedRate(String user, Object source, Object... args); - static void getAcknowledgeAttempts(Object source) { LOGGER.getMessagesAcknowledged(getCaller(), source); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java index f76790559b2..4b09a5f11ff 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java @@ -105,12 +105,6 @@ public interface QueueControl { @Attribute(desc = MESSAGE_COUNT_DESCRIPTION) long getMessageCount(); - /** - * Returns the rate of writing messages to the queue. - */ - @Attribute(desc = "rate of writing messages to the queue currently (based on default window function)") - float getProducedRate(); - /** * Returns the persistent size of all messages currently in this queue. The persistent size of a message * is the amount of space the message would take up on disk which is used to track how much data there diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java index 85cb672974e..cdf589d335c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java @@ -270,17 +270,6 @@ public long getMessageCount() { } } - @Override - public float getProducedRate() { - if (AuditLogger.isEnabled()) { - AuditLogger.getProducedRate(queue); - } - checkStarted(); - - // This is an attribute, no need to blockOnIO - return queue.getRate(); - } - @Override public long getPersistentSize() { if (AuditLogger.isEnabled()) { @@ -920,7 +909,7 @@ public long countMessages(final String filterStr) throws Exception { AuditLogger.countMessages(queue, filterStr); } - Long value = internalCountMessages(filterStr, null).get(null); + Long value = intenalCountMessages(filterStr, null).get(null); return value == null ? 0 : value; } @@ -930,10 +919,10 @@ public String countMessages(final String filterStr, final String groupByProperty AuditLogger.countMessages(queue, filterStr, groupByProperty); } - return JsonUtil.toJsonObject(internalCountMessages(filterStr, groupByProperty)).toString(); + return JsonUtil.toJsonObject(intenalCountMessages(filterStr, groupByProperty)).toString(); } - private Map internalCountMessages(final String filterStr, final String groupByPropertyStr) throws Exception { + private Map intenalCountMessages(final String filterStr, final String groupByPropertyStr) throws Exception { checkStarted(); clearIO(); @@ -968,7 +957,7 @@ public long countDeliveringMessages(final String filterStr) throws Exception { AuditLogger.countDeliveringMessages(queue, filterStr); } - Long value = internalCountDeliveryMessages(filterStr, null).get(null); + Long value = intenalCountDeliveryMessages(filterStr, null).get(null); return value == null ? 0 : value; } @@ -978,10 +967,10 @@ public String countDeliveringMessages(final String filterStr, final String group AuditLogger.countDeliveringMessages(queue, filterStr, groupByProperty); } - return JsonUtil.toJsonObject(internalCountDeliveryMessages(filterStr, groupByProperty)).toString(); + return JsonUtil.toJsonObject(intenalCountDeliveryMessages(filterStr, groupByProperty)).toString(); } - private Map internalCountDeliveryMessages(final String filterStr, final String groupByPropertyStr) throws Exception { + private Map intenalCountDeliveryMessages(final String filterStr, final String groupByPropertyStr) throws Exception { checkStarted(); clearIO(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java index 85ed6e347ae..f091df64471 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java @@ -259,11 +259,6 @@ public long getMessageCount() { return (Long) proxy.retrieveAttributeValue("messageCount", Long.class); } - @Override - public float getProducedRate() { - return (Long) proxy.retrieveAttributeValue("producedRate", Long.class); - } - @Override public long getMessagesAdded() { return (Integer) proxy.retrieveAttributeValue("messagesAdded", Integer.class);