This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-website.git


The following commit(s) were added to refs/heads/main by this push:
     new b42378cca Add info about removeAllMessageGroups for manual rebalancing 
groups
b42378cca is described below

commit b42378cca8e2ae0dc9d08c62769358997e4a5685
Author: Justin Bertram <jbert...@apache.org>
AuthorDate: Thu Jul 20 10:12:42 2023 -0500

    Add info about removeAllMessageGroups for manual rebalancing groups
---
 src/message-groups.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/message-groups.md b/src/message-groups.md
index 19468c490..e61ba0888 100644
--- a/src/message-groups.md
+++ b/src/message-groups.md
@@ -129,6 +129,8 @@ The following code snippet shows how to wait for two 
consumers (or two seconds)
 ```
 As [the appropriate test 
case](https://github.com/apache/activemq/blob/master/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupDelayedTest.java)
 shows, adding a small time pause before dispatching or setting a minimum 
consumer number, ensures equal message group distribution.
 
+If you need to rebalance the message groups manually for any reason you can do 
so by executing the `removeAllMessageGroups` operation on the JMX MBean of the 
corresponding queue.
+
 ### Competing demands of memory consumption, load balancing, complexity, etc.
 
 The default behavior called `CachedMessageGroupMap` is limited to 1024 message 
groups in an LRU cache may not match you expectation w.r.t message order. 
`CachedMessageGroupMap` has bounded memory use, but only keeps track of up to 
1024 (or the maximum configured size) groups, then loses track of any groups 
older than the newest 1024. In this way, if there are more groups than the 
maximum, **ordering will be lost for the oldest groups**.

Reply via email to