Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KahaDB and LevelDB - What's the real difference?

I'm trying to use ActiveMQ 5.8.0 in my project. There are two different storage configurations, KahaDB and LevelDB. Depending on the problem, Kaha can be faster than Level or Level can be faster than Kaha.

What's the real difference between them?

like image 336
R. Karlus Avatar asked Jul 02 '14 14:07

R. Karlus


People also ask

What is KahaDB?

KahaDB is a file based persistence database that is local to the message broker that is using it. It has been optimized for fast persistence. It is the the default storage mechanism since ActiveMQ 5.4. KahaDB uses less file descriptors and provides faster recovery than its predecessor, the AMQ Message Store.

How does ActiveMQ store messages?

The AMQ message store directory structure. When you start ActiveMQ with the AMQ message store configured, a directory will automatically be created in which the persistent messages are held. The AMQ message store directory contains subdirectories for all the brokers that are running on the machine.


1 Answers

The two stores are similar in that they both utilize an index to track the location and state of messages written into a Journal. The differences lay in the way in which the index is implemented among other things. LevelDB is a slightly faster index than KahaDB and can provide somewhat better performance numbers. In later releases of ActiveMQ the LevelDB store also supports replication.

Given that you are on an older release where the LevelDB store implementation was still very young I'd recommend sticking with KahaDB as it is much more mature and has many of the early bugs worked out. The LevelDB store in 5.8 is not really production ready and will probably cause you some trouble. You can move to the newest release v5.10 and LevelDB will be much more robust.

NOTE: LevelDB has been deprecated by the community and is not supported any longer. It will likely be fully removed in ActiveMQ 5.17.0

like image 58
Tim Bish Avatar answered Sep 21 '22 16:09

Tim Bish