This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 21e6684845 ARTEMIS-5815 countMessages(Filter) should not limit the
browsing operation
21e6684845 is described below
commit 21e66848451e9b724e72ddc89705fba4e037f6d9
Author: Clebert Suconic <[email protected]>
AuthorDate: Mon Dec 15 12:14:53 2025 -0500
ARTEMIS-5815 countMessages(Filter) should not limit the browsing operation
---
.../activemq/artemis/core/management/impl/QueueControlImpl.java | 4 +---
.../artemis/tests/integration/management/QueueControlTest.java | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
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 de7b6876d1..6522c2e1a8 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
@@ -1091,11 +1091,9 @@ public class QueueControlImpl extends AbstractControl
implements QueueControl {
if (filter == null && groupByProperty == null) {
result.put(null, getMessageCount());
} else {
- final int limit =
addressSettingsRepository.getMatch(address).getManagementBrowsePageSize();
- int count = 0;
try (LinkedListIterator<MessageReference> iterator =
queue.browserIterator()) {
try {
- while (iterator.hasNext() && count++ < limit) {
+ while (iterator.hasNext()) {
Message message = iterator.next().getMessage();
internalComputeMessage(result, filter,
groupByProperty, message);
}
diff --git
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
index 9f115e48a2..00a0205a2f 100644
---
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
+++
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
@@ -4818,7 +4818,7 @@ public class QueueControlTest extends ManagementTestBase {
assertEquals(5, array.size());
// filer could match all
- assertEquals(5, queueControl.countMessages("AMQSize > 0"));
+ assertEquals(10, queueControl.countMessages("AMQSize > 0"));
session.deleteQueue(queue);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]