当前位置:网站首页>ActiveMQ -- JDBC Journal of persistent mechanism
ActiveMQ -- JDBC Journal of persistent mechanism
2022-07-25 09:18:00 【Why don't you laugh】

about activemq Long term persistence , In the use of JDBC It is also recommended to use high-performance journal
Activemq Journal, Cache write technology is used , Greatly improved performance , because JDBC It takes time to write and read messages every time , If there is a large amount of message data , It will cause frequent library writing .
journal It will save the information produced by the producer to journal In file , When consumers consume quickly ,journal Messages in the file are not synchronized to DB Before , Consumers have already consumed 90% The news of , At this time , Just synchronize the rest 10% The news came to DB. If consumers spend slowly ,journal Files can be written in batches DB.
journal To configure
stay activemq.xml Modify configuration
Before jdbc Configuration of :
<persistenceAdapter>
<jdbcPersistenceAdapter dataDirectory="activemq-data" useDatabaseLock="false" dataSource="#mysql-ds" createTablesOnStartup="true" />
</persistenceAdapter>
Change to : add to journal To configure
<persistenceFactory>
<journalPersistenceAdapterFactory journalLogFiles="4" journalLogFileSize="32768" useJournal="true" useQuickJournal="true" dataDirectory="activemq-data" useDatabaseLock="false" dataSource="#mysql-ds" createTablesOnStartup="true" />
</persistenceFactory>
test
Start producer production message , Check the database again ,ACTIVEMMQ_MSGS No message will be written immediately , because journal The existence of , Need to wait for a while
边栏推荐
- js触屏小游戏源码冰雪之旅
- table表格展开内部行切换效果
- 艺术 NFT 的发展之路
- sticksy.js页面滚动div固定位置插件
- 神经网络学习(1)前言介绍
- JS pop-up City filtering component matches mobile terminal
- Druid 查询超时配置的探究 → DataSource 和 JdbcTemplate 的 queryTimeout 到底谁生效?
- Live broadcast preview | how to build an enterprise cloud management platform in the cloudy era?
- Do you know these methods of MySQL database optimization?
- JMeter test plan cannot be saved solution
猜你喜欢

The simplest sklearn environment configuration tutorial in the whole network (100% success)

Robot jumping problem

activemq--延迟投递和定时投递

超赞的yolo目标检测训练所用垃圾分类数据集共享——标注好的约3000张
![[buuctf-n1book][Chapter 2 advanced web]ssrf training](/img/29/8894d04b27e0e73c4458c27bd9b935.png)
[buuctf-n1book][Chapter 2 advanced web]ssrf training
![[stl]stack & queue simulation implementation](/img/92/c040c0e937e2666ee179189c60a3f2.png)
[stl]stack & queue simulation implementation

Arcgis10.2 installation tutorial

Programmers can't SQL? Ashes Engineer: all waiting to be eliminated! This is a must skill!

Comparison between symmetric encryption and asymmetric encryption

Table table expansion internal row switching effect
随机推荐
Illustration leetcode - 919. Complete binary tree inserter (difficulty: medium)
ActiveMQ -- leveldb of persistence mechanism
API parsing of JDBC
How to use pixi.js to make simple Parkour games
activemq--异步投递
Sort out Huawei ap-3010dn_ V2 configuration create WiFi
OmniPeek packet capturing tool
[SCADA case] myscada helps VIB company realize the modernization and upgrading of production line
activemq--消息重试机制
Leetcode-238. product of arrays other than itself
activemq--持久化机制之LevelDB
Additional: SQL statement area / county in the lower half (data table)
How to write the code of wechat applet implementation tab
LabVIEW experiment - temperature detection system (experimental learning version)
Silicon Valley class lesson 11 - official account news and wechat authorization
51 single chip microcomputer key control LED light status
Additional: SQL statement area / county in the middle half (data table)
[C language] dynamic memory management, flexible array
activemq--可持久化机制之JDBC代码
How to connect tdengine with idea database tool?