activemq-classicstorageactivemq-artemis

ActiveMQ Artemis vs ActiveMQ Classic message store


In ActiveMQ Classic 5 each queue had a folder containing its data and messages, everything. Which would mean that, in case of an issue, for example an out of disk space error. Some files would get corrupted before the server crash. In that case, in ActiveMQ Classic 5, we would find logs indicating corrupted files, and we could delete the queue folder that was corrupted, resulting in small loss of messages instead of ALL messages.

In ActiveMQ Artemis it seems that messages are stored in the same files, independently from the queue they are stored in. Which means if I get an out of disk space error, I might have to delete all my messages.

First, can you confirm the change of behavior, and secondly, is there a way to recover? And a bonus, if anyone know why this change happened, I would like to understand.


Solution

  • Artemis uses a completely new message journal implementation as compared to Classic. The same journal is used for all messages. However, it isn't subject to the same corruption problems as you've seen with Classic. If records from the journal can't be processed then they are simply skipped.

    If you get an out of disk space error you should never need to delete all your messages. The journal files themselves are allocated and filled with zeroes to meet their configured size before they are actually used so if you were going to run out of disk space you'd do so during that process before any messages were written to them.

    The Artemis journal implementation was written from the ground up for high performance specifically in conjunction with the broker's non-blocking architecture.