当前位置:网站首页>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的悲观锁
边栏推荐
- The annualization of financial products is 4%. How much profit can you get from buying 10000 yuan a month?
- 酷炫canvas动画冲击波js特效
- Rich text style word image processing
- 超赞的yolo目标检测训练所用垃圾分类数据集共享——标注好的约3000张
- JDBC quick start
- Ctfhub skill tree Web
- Disable module (attribute node) in LabVIEW
- JS pop-up City filtering component matches mobile terminal
- Visual query (sp_helptext) -- quick query of stored procedures containing specified strings (with source code)
- c语言中的六个存储类型:auto register static extern const volatile
猜你喜欢

Redis/Mysql知识概述

JS touch screen game source code ice and snow journey

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

How to avoid duplicate data when the database is high and distributed

What are the commands used by pl/sql tools to export SQL files?

JMeter test plan cannot be saved solution

LeetCode·83双周赛·6129.全0子数组的数目·数学

Canvas dynamic picture avatar shaking JS special effect

table表格展开内部行切换效果

Sort out Huawei ap-3010dn_ V2 configuration create WiFi
随机推荐
Redis learning notes
机器人跳跃问题
Solving a random number problem
sql注入
对称式加密与非对称式加密的对比
[learn rust together] a preliminary understanding of rust package management tool cargo
sticksy.js页面滚动div固定位置插件
51 MCU peripherals: Motor
How does Youxuan database encrypt data?
神经网络学习(1)前言介绍
flink sql怎么持久化?
Silicon Valley class lesson 11 - official account news and wechat authorization
JDBC的api全解
[BUUCTF-n1book][第二章 web进阶]SSRF Training
Druid 查询超时配置的探究 → DataSource 和 JdbcTemplate 的 queryTimeout 到底谁生效?
Illustration leetcode - 1184. Distance between bus stops (difficulty: simple)
Neural network learning (1) Introduction
How to do the game plug-in?
[STL]list模拟实现
【npm】 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。