Skip to content

Commit 90a21fb

Browse files
jbertramtabish121
authored andcommitted
ARTEMIS-5841 clarify docs for global-max settings
1 parent b90c861 commit 90a21fb

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

docs/user-manual/paging.adoc

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,28 @@ The broker will add messages as long as all these limits are satisfied.
148148
If all these values are set to -1 the broker will keep reading messages as long as the consumer is reaching for more messages.
149149
However this would keep the broker unprotected from consumers allocating huge transactions or consumers that don't have flow control enabled.
150150

151-
== Global Max Size
151+
== Global Settings
152152

153-
Beyond the `max-size-bytes` on the address you can also set the global-max-size on the main configuration.
154-
If you set `max-size-bytes` = `-1` on paging the `global-max-size` can still be used.
153+
Aside from `max-size-bytes` and `max-messages`, which operate on a per-address basis, there are also _global_ settings which apply to all addresses.
155154

156-
== Global Max Messages
155+
When the total accumulated size or number of messages sent to a the broker exceeds the global limit then the `address-full-policy` for the corresponding address will be enforced.
157156

158-
You can also specify `global-max-messages` on the main configuration, specifying how many messages the system would accept before entering into the configured full policy mode configured.
157+
If both `max-size-bytes` and `max-messages` are set to `-1` on a particular address the global setting will still be enforced.
159158

160-
When you have more messages than what is configured `global-max-size` any new produced message will make that destination to go through its paging policy.
159+
=== Global Max Size
161160

162-
`global-max-size` is calculated as a percentage of the max memory available to the Java Virtual Machine, unless specified in the broker.xml configuration directly. The percentage value used is configurable using the option `global-max-size-percent-of-jvm-max-memory` in the XML configuration and if not specified the default value of `global-max-size-percent-of-jvm-max-memory` is 50% or half the max available memory.
161+
The `global-max-size` is the total number of bytes that can be sent to all the addresses on the broker.
162+
It is calculated as a percentage of the max memory available to the Java Virtual Machine (i.e. the value of `-Xmx`), unless specified explicitly in `broker.xml`.
163+
By default, 50% of the max memory is used.
164+
However, this percentage can be changed using `global-max-size-percent-of-jvm-max-memory` in `broker.xml`.
163165

164-
By default `global-max-messages` = `-1` meaning it's disabled.
166+
Use `-1` to disable this functionality.
167+
168+
=== Global Max Messages
169+
170+
The `global-max-messages` is the total number of messages that can be sent to all the addresses on the broker.
171+
172+
By default `global-max-messages` is `-1` (i.e. disabled).
165173

166174
== Dropping messages
167175

0 commit comments

Comments
 (0)