Page messages in AMQ to disk rather than memory
Issue
- We are experimenting with paging in Red Hat AMQ broker:
https://access.redhat.com/documentation/en-us/red_hat_amq/7.4/html/configuring_amq_broker/paging#paging_address.
We thought we would try to configure expiry and DLQ addresses to always page to disk and not hold the messages in memory, since there is no performance benefit and it would free up memory for active queues.
We tried the following configuration:
<address-setting match="DLQ">
<max-size-bytes>0</max-size-bytes>
<address-full-policy>PAGE</address-full-policy>
</address-setting>
However the broker gave us an error on startup. Is it possible to configure expiry and DLQs to not use memory, and always page to disk?
2019-08-05 14:49:45,549 ERROR [org.apache.activemq.artemis.core.server] AMQ224000: Failure in initialisation: java.lang.IllegalStateException: pageSize for address DLQ >= maxSize. Normally pageSize should be significantly smaller than maxSize, ms: 0 ps 10485760
at org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.<init>(PagingStoreImpl.java:156) [artemis-server-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.core.paging.impl.PagingStoreFactoryNIO.reloadStores(PagingStoreFactoryNIO.java:226) [artemis-server-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.core.paging.impl.PagingManagerImpl.reloadStores(PagingManagerImpl.java:304) [artemis-server-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.core.paging.impl.PagingManagerImpl.start(PagingManagerImpl.java:397) [artemis-server-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart1(ActiveMQServerImpl.java:2351) [artemis-server-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:64) [artemis-server-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:544) [artemis-server-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:481) [artemis-server-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:111) [artemis-cli-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:85) [artemis-cli-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:149) [artemis-cli-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:97) [artemis-cli-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:124) [artemis-cli-2.6.3.redhat-00013.jar:2.6.3.redhat-00013]
.............................................................................................................
.........................................................................................................................
Environment
- Red Hat AMQ
- 7.4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.