Hi: I'm using AMQ 5.10.0 and I'm trying to understand some behaviour about destination memory limits and how messages are managed in queues by AMQ
I've defined a persistent broker ( kahaDB ) with <policyEntry queue=">" optimizedDispatch="true" producerFlowControl="true" memoryLimit="100 mb"/> and <storeUsage> <storeUsage limit="500 mb"/> </storeUsage> My test tries to send 2000 messages (1MB). They are persistent messages. And *there isn't any consumer reading messages-* The result is that in the 249th ( it's not a fixed number after several tests), control flow is activated 2014-09-06 13:19:11,246 | INFO | Usage Manager Memory Limit (104857600) reached on queue://foo.bar, size 249. Producers will be throttled to the rate at which messages are removed from this destination to prevent flooding it. My questions are: - why does AMQ need 100MB in memory to manage persistent messages ? There isn't any consumer , so all messages should be stored into disk ( up to storeUsage limit, ie, 500MB) - if the test sends non persistent messages, when the 100th message is sent, temporary store is activated ( up to tempUsage limit ) Why are the non persistent messages swapped to disk and memoryLimit looks not be a problem if there is disk space enough, but persistent messages require memory despite there is disk space enough? Thanks and regards