Details
-
Enhancement
-
Resolution: Done
-
Minor
-
8.0.0.Alpha1
-
None
Description
When HornetQ address-full-policy is switched from BLOCK to PAGE, the following exception is thrown during shutdown.
Exception: 09:48:05,247 WARN [org.hornetq.core.server] (MSC service thread 1-3) HQ222160: unable to send notification when broadcast group is stopped: java.lang.IllegalStateException: pageSize for address hornetq.notifications >= maxSize. Normally pageSize should be significantly smaller than maxSize, ms: 10485760 ps 10485760 at org.hornetq.core.paging.impl.PagingStoreImpl.<init>(PagingStoreImpl.java:147) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1] at org.hornetq.core.paging.impl.PagingStoreFactoryNIO.newStore(PagingStoreFactoryNIO.java:98) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1] at org.hornetq.core.paging.impl.PagingManagerImpl.newStore(PagingManagerImpl.java:250) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1]
The standalone-full.xml configuration overrides the default address-setting's max-size-bytes (defaults to -1) to set it at 10 MiB.
However, if the admin changes the address-full-policy from BLOCK to PAGE, it will conflict with the default value for page-size-bytes which is also 10MiB.
To make the overridden standalone-full.xml more consistent, we can override page-size-bytes and set it to 2MiB (2097152 bytes). This change has no effect when the address-full-policy remains at BLOCK. When it is changed to PAGE, the resulting configuration will be coherent and there will be no exception thrown