javaactivemq-classicmessage-queuepersistent-datakahadb

kaha db message store for persistent messages


I know db-xx.log is the journal file and db.redo is the reference file?

db-xx.log stores messages which are not consumed, yet. Those messages will be deleted from db-xx.log after being consumed. db.redo stores references of messages (which are stored in db-xx.log) by message id.

  1. But, what are db.data and db.free?
  2. What are their functions?

My understanding is that broker stores messages in cache (which is volatile memory) first, and then those messages are moved (appended) to db-xx.log when checkpoint or cache size is full.

  1. Is that correct?

Thanks


Solution

  • db.data holds btree pages which reference the un-consumed messages. The db.redo is a redo log of the updates that are about to be performed against the db.data. The db.free keeps track of the free pages in the db.data.