concept AMQ message store in category activemq

This is an excerpt from Manning's book ActiveMQ in Action.
The AMQ message store, like KahaDB, is a combination of a transactional journal for reliable persistence (to survive system crashes) and high-performance indexes, which makes this store the best option when message throughput is the main requirement for an application. But because it uses two separate files for every index, and there’s an index per destination, the AMQ message store shouldn’t be used if you intend to use thousands of queues per broker. Also, recovery can be slow if the ActiveMQ broker isn’t shut down cleanly. This is because all the indexes need to be rebuilt, which requires the broker to traverse all its data logs to accurately build the indexes again.
In the next section, we’ll briefly examine the internals of the AMQ message store, which are similar to the components of KahaDB.
The main components of the AMQ message store are similar to that of the KahaDB message store, in that there’s a cache, message data logs, and a reference store for accessing the data logs in order. Figure 5.5 provides a high-level diagram of the AMQ message store.
Figure 5.5. In the AMQ store messages are stored in referenced log files and cached for performance.
![]()
The diagram provides a view of the three distinct parts of the AMQ message store:
Table 5.2. Configuration properties for the AMQ message store