In our projects, we use two queues, one for normal processing, and another for errors. The "error" queue sometimes gets filled with "error" messages, which are sitting there, until a human checks them out. In some cases, the "error" queue fills out with a lot of messages, and then the JVM runs out of heap.
For instance, currently, the JVMs configured with max 4GB heap, and get OOM exception at random times. We used a MemoryAnalyzer as well as IBM Heap Analyzer and both somewhat point to Artemis. When I checked the size of the journal on the file system, it is about 5GB.
We send:
- Small messages
- Persistent
- Not using Netty or remoting (just use Artemis for async processing)
So, my questions are about Apache Artemis heap management and recommendations:
- Does it store persistent messages in RAM as well, even if they are already stored on the file system?
- If #1 is true, what is the strategy to control/limit amount od RAM allocated by Artemis?
Appreciate any help!