You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-manual/paging.adoc
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,20 +148,28 @@ The broker will add messages as long as all these limits are satisfied.
148
148
If all these values are set to -1 the broker will keep reading messages as long as the consumer is reaching for more messages.
149
149
However this would keep the broker unprotected from consumers allocating huge transactions or consumers that don't have flow control enabled.
150
150
151
-
== Global Max Size
151
+
== Global Settings
152
152
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.
155
154
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.
157
156
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.
159
158
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
161
160
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`.
163
165
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).
0 commit comments