当前位置:网站首页>activemq--可持久化机制之KahaDB
activemq--可持久化机制之KahaDB
2022-07-25 09:12:00 【你怎么不笑了】
KahaDB
KahaDB是一个基于文件的持久性数据库,从5.4版本开始默认使用,类似于redis的AOF
具有更好的快速持久性
配置
查看 activemq.xml

在activemq安装路径下,activemq/data/hahadb,可以看到db文件

KahaDB存储原理
KahaDB目前是默认的存储方式,可用于任何场景,提高了性能和恢复能力.
消息存储使用一个事务日志和一个索引来存储他所有的地址.
KahaDB数据保存目录有4类文件加1个lock文件。
db-1.log,db.data,db.free,db.redo,lock
db-<number>.log存消息数据,number表示存储消息达到预定的大小时,文件的命令方式。当文件满时,会创建一个新的文件,number值是随之递增的,db-1.log,db-2.log,db-3.log… 当不再有消息存到数据文件中时,文件会被删除或存档存的是具体的消息数据db.data包含了持久化的B-Tree索引,索引了消息数据记录中(db-.log)的消息,他是消息的索引文件,本质上是B-Tree,使用B-Tree作为索引指向db-<number>.log里面的存储的数据索引文件db-free 记录db.data文件里面的空闲页面,存的是空闲页的id,方便建立索引时,先从空闲的开始建立保证索引的连续性,没有碎片db.redo 进行消息恢复,如果kahaDB消息存储强制退出后启动,用于恢复B-Tree索引lock文件锁,表示当前获取kahaDB读写权限的broker,类似mysql的悲观锁
边栏推荐
- Comparison between symmetric encryption and asymmetric encryption
- Live broadcast preview | how to build an enterprise cloud management platform in the cloudy era?
- Yolov5 environment configuration
- Six storage types in C language: Auto register static extern const volatile
- js触屏小游戏源码冰雪之旅
- 51 single chip microcomputer key control LED light status
- JDBC快速入门
- 整理 华为AP-3010DN_V2配置创建wifi
- Django4.0 + web + MySQL 5.7 realize simple login operation
- This is the worst controller layer code I've ever seen
猜你喜欢

Wechat reservation applet graduation project (7) mid term inspection report of applet completion works

(self drawn ugly picture) simple understanding tcp/ip three handshakes and four waves

为什么要使用MQ消息中间件?这几个问题必须拿下!

360度拖拽全景图插件tpanorama.js

A picture to quickly understand envoyfilter in istio

JS small game source code magic tower breakthrough Download

Comments on specific applications of camera

51 MCU internal peripherals: timer and counter

Oracle10g单实例数据库升级到哪个版本好,求建议

JMeter test plan cannot be saved solution
随机推荐
The simplest sklearn environment configuration tutorial in the whole network (100% success)
How to write the code of wechat applet implementation tab
【sklearn】sklearn.preprocessing.LabelEncoder
Asp. Net core CMD common instructions
IDEA下依赖冲突解决方法
Wechat reservation of small program completion works (5) assignment book of small program graduation project
Robot jumping problem
Neural network learning (1) Introduction
Unity HTC vive use
The international summit osdi included Taobao system papers for the first time, and end cloud collaborative intelligence was recommended by the keynote speech of the conference
28. Slot
Read and write models and organize notes
[deep learning] mask Dino Trilogy - the correct way to open Detr Pandora's box
对称式加密与非对称式加密的对比
[learn rust together] a preliminary understanding of rust package management tool cargo
Overview of redis/mysql knowledge
附加:下半部分sql语句 区/县(数据表)
JDBC的api全解
51单片机内部外设:串口通信
Wechat sports field reservation of the finished works of the applet graduation project (4) opening report