At the moment there is no broker-specific configuration that would impact this use-case. I recommend you simply give the JVM more memory to deal with the size of the JDBC ResultSet.
Justin On Thu, May 9, 2024 at 3:55 AM Rakesh Athuru <rakesh.ath...@planonsoftware.com.invalid> wrote: > Hi, > > I am using JBoss Wildfly server with ActiveMQ (Artemis) configured. > I have a queue with persistency (to MS SQLServer DB) enabled, and when the > queue contains lot of messages (persisted to DB), upon restart of the > Wildfly server, queue loading results OutOfMemory error. > When I looked at heapdump, I see heap contains > org.apache.activemq.artemis.core.journal.RecordInfo objects and these are > being created from > "org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl#load(org.apache.activemq.artemis.core.journal.LoaderCallback)". > Also I see query used by > 'org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl' to select > messages, it queries complete table, this means if the table has 100000 > records all of them are read at once and for each row RecordInfo object > will be created. > > Is there a configuration which influences this usecase and through which I > can avoid OutOfMemory error ? > > Regards, > Rakesh.A > >