Hi James, if you are using persistent messages sent to durable queues then the Java Broker should be able to evict the message content from memory when low memory conditions are reached (though it does retain some overhead for meta data relating to the entry of the message on the queue). Messages not marked as persistent will retain all their content in memory (and thus if not restricted by other means, such as TTL, or producer flow control), excessive queue size may cause out of memory exceptions.
In terms of controlling the amount of message data retained by the broker in memory, there are currently a number of steps you could take... firstly - as above - ensuring that you are using persistent messages. Secondly you can use TTL to cause message expiry (if this is appropriate for your use case). You can also use producer flow control to enforce (approximate) limits on how large queues can grow. Unfortunately the Java Broker does not yet implement all the queue policies that the C++ Broker implements... in particular there is no way of limiting the size or depth of a queue, and discarding messages in either a FIFO or LIFO manner - is this the sort of functionality you would be looking for? I know Alex produced a patch at some point for implementing ring queues in the Java Broker, but we've not yet seen a great deal of demand for this behaviour... however I believe Fraser outlined a use case where it might be useful, and possibly you also have such a use case -- Rob On 5 August 2013 21:40, jbelch <[email protected]> wrote: > Keith, > > We have increased it to 2GB in the qpid-server. We could continue to > increase it, but we wanted to figure out if there was a way to get the Qpid > broker to cleanup. We are using Berkeley DB as the message store and we > only have two queues marked as durable right now. The errors I see right > before it crashes are: > > MESSAGE_COUNT_ALERT on Queue <queue> - 180: Maximum count on queue > threshold > (50) breached > MESSAGE_AGE_ALERT on Queue <queue> - 343925s: Maximum age on queue > threshold > (3600s) breached > > > > -- > View this message in context: > http://qpid.2158936.n2.nabble.com/Automatic-queue-cleanup-tp7596467p7596486.html > Sent from the Apache Qpid users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
