KahaDB and LevelDB - What's the real difference?
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
I would stay away from LevelDB for ActiveMQ for any new projects. The KahaDB, LevelDB picture changed somewhat.
The LevelDB store has been deprecated and is no longer supported or recommended for use. The recommended store is KahaDB
You will see this in the LevelDB documentation: http://activemq.apache.org/leveldb-store.html
So the KahaDB, LevelDB picture changed somewhat. We considered using LevelDB for a production setup with 3 ActiveMQ instances monitored by 3 Zookeeper instances. The prototype worked quite nice, except when simulating an ActiveMQ instance crash, we experienced occasional LevelDB corruptions during the restart of that instance.
You now have the following choices when persistent messaging is required:
- Use Apache ActiveMQ and a database as persistent message store (jdbc)
- Use a shared block level or file level share file system (NFS, CIFS or even GlusterFS) for the KahaDB message store and work with ActiveMQ Master / Slave
- Apache ActiveMQ Artemis
- Apache Kafka