KahaDB
activeby Apache Software Foundation (ActiveMQ project) · since 2009 · also known as Kaha DB, ActiveMQ KahaDB
Apache ActiveMQ Classic's built-in journal-plus-B-tree message store; a persistence engine, not a general DB.
Overview
KahaDB is the file-based persistence layer embedded in Apache ActiveMQ Classic: it arrived with ActiveMQ 5.3 in 2009 and has been the default message store since 5.4 (2010). Messages are appended to rolling journal files and located through a B-tree index kept in a page file, with checkpoints, checksums and recovery tooling to survive crashes; mKahaDB spreads destinations across several instances. It replaced the older AMQ Message Store with fewer file descriptors and faster recovery, and it ships with every ActiveMQ Classic release (6.3.2 in September 2026). You do not query KahaDB as a database: it exists to make broker messages durable, so it belongs on this list only as the storage engine behind a widely deployed broker.
Strengths & trade-offs
Strengths
- +Append-only journal gives fast durable message writes
- +Default and battle-tested store for ActiveMQ Classic
- +Configurable checksums, checkpoints and corrupt-journal recovery
- +Zero extra infrastructure: lives in the broker's data directory
Trade-offs
- −Not a general-purpose database; no query interface
- −Large backlogs or slow consumers can bloat journals and index files
- −Single-broker scope; HA relies on shared storage or replication of the broker
Great for
- +Durable message persistence for ActiveMQ Classic brokers
- +Example of a journal plus B-tree index storage design
Think twice for
- −Storing or querying application data
- −Use outside ActiveMQ
Capabilities
Native or official first-party support · 2 of 25 tracked
Scale & consistency
- Comfortable data size
- Small · ≤ 100 GB
- Horizontal scaling
- None
- Multi-region
- No
- Transactions
- Limited ACID
- Consistency
- Strong
- Schema
- Schemaless
- Architecture
- Embedded
- Query languages
- None (internal broker API)
One store per broker; multiKahaDB partitions destinations across instances; HA via shared-storage master/slave.
Deployment
Ecosystem
Alternatives to KahaDB
Meta's embeddable LSM-tree key-value engine, the storage layer under dozens of databases.
kahadb vs rocksdb →Google's original small, fast LSM key-value library, now in limited-maintenance mode.
kahadb vs leveldb →The 1990s-era embedded key-value library, now Oracle-owned, AGPL-licensed and rarely updated.
kahadb vs berkeley-db →A purpose-built event store for event sourcing, with streams, subscriptions and projections.
kahadb vs kurrentdb →Pure-Go embedded key-value store with Bitcask storage and Redis-like lists, sets and sorted sets.
kahadb vs nutsdb →The standard embedded JVM cache, with heap, off-heap and disk tiers and optional Terracotta clustering.
kahadb vs ehcache →KahaDB FAQ
What is KahaDB?
KahaDB is a key-value database by Apache Software Foundation (ActiveMQ project), first released in 2009. KahaDB is the file-based persistence layer embedded in Apache ActiveMQ Classic: it arrived with ActiveMQ 5.3 in 2009 and has been the default message store since 5.4 (2010). Messages are appended to rolling journal files and located through a B-tree index kept in a page file, with checkpoints, checksums and recovery tooling to survive crashes; mKahaDB spreads destinations across several instances. It replaced the older AMQ Message Store with fewer file descriptors and faster recovery, and it ships with every ActiveMQ Classic release (6.3.2 in September 2026). You do not query KahaDB as a database: it exists to make broker messages durable, so it belongs on this list only as the storage engine behind a widely deployed broker.
Is KahaDB open source?
Yes. KahaDB is open source. License: Apache License 2.0.
Does KahaDB support ACID transactions?
Partly. KahaDB offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong consistency.
Does KahaDB scale horizontally?
KahaDB does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).
How can I run KahaDB?
You can self-host it and embed it in your application.
What is KahaDB best for?
KahaDB is a strong fit for durable message persistence for ActiveMQ Classic brokers and example of a journal plus B-tree index storage design. Think twice for storing or querying application data.
What are the best alternatives to KahaDB?
Common alternatives to KahaDB include RocksDB, LevelDB, Oracle Berkeley DB, KurrentDB (EventStoreDB) and NutsDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is KahaDB?
KahaDB has little measurable public adoption today, so it ranks near the bottom of the WhichDB Score.

