I am using **ActiveMQ** and have a question about how and when the persisted messages do really get swapped to disk, while waiting for consumer?

I am using *virtual topics*, and create queue consumers to receive messages from them. All messages are **persisted** (I've verified that records for all non consumed messages do present in the persistence storage)

I have a multiple consumers which regularly come on and off line. Having connected **jconsole** to activemq I noticed that **ALL not consumed messages** seem to be contained in broker's memory. They do not get swapped to disk, at least I was not able to verify that.
Setting the `memoryUsage` or turning `producerFlowControl` on - does not have any effect. Broker is whether blocked if memoryUsage limit is hit with flow control on, or MemoryPercentUsage keeps increasing if flow control is off.

When exactly activemq frees memory by storing the messages to disk/persistence storage? Or does it so? How can I verify it is disk space not RAM which will limit the broker in a long run when there are millions of not consumed (pending) messages in queues?