ActiveMQ 持久化讯息数据库信息
生活随笔
收集整理的這篇文章主要介紹了
ActiveMQ 持久化讯息数据库信息
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
www.MyException.Cn???發布于:2012-11-10 10:48:50???瀏覽:0次 ActiveMQ 持久化消息數據庫信息?????? 最近有網友問我,ActiveMQ持久化的中表結構是什么,表需要人工創建嗎?我告訴他們不需要,ActiveMQ會幫助我們生成的。只需要制定采用的數據庫名稱并,創建數據庫即可。以為為ActiveMQ采用MySQL5.1持久化產生的SQL語句:
持久化的代碼實現為:
http://topmanopensource.iteye.com/blog/1066383
持久化mysql數據庫的3張表;
activemq_acks:ActiveMQ的簽收信息。
activemq_lock:ActiveMQ的鎖信息。
activemq_msgs:ActiveMQ的消息的信息
# MySQL-Front 5.1 (Build 4.2)/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */; /*!40101 SET SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */; /*!40103 SET SQL_NOTES='ON' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS */; /*!40014 SET UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS */; /*!40014 SET FOREIGN_KEY_CHECKS=0 */;# Host: localhost Database: activemq # ------------------------------------------------------ # Server version 5.1.40-communityDROP DATABASE IF EXISTS `activemq`; CREATE DATABASE `activemq` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `activemq`;# # Source for table activemq_acks #DROP TABLE IF EXISTS `activemq_acks`; CREATE TABLE `activemq_acks` (`CONTAINER` varchar(250) NOT NULL,`SUB_DEST` varchar(250) DEFAULT NULL,`CLIENT_ID` varchar(250) NOT NULL,`SUB_NAME` varchar(250) NOT NULL,`SELECTOR` varchar(250) DEFAULT NULL,`LAST_ACKED_ID` bigint(20) DEFAULT NULL,`PRIORITY` bigint(20) NOT NULL DEFAULT '5',PRIMARY KEY (`CONTAINER`,`CLIENT_ID`,`SUB_NAME`,`PRIORITY`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;# # Dumping data for table activemq_acks #LOCK TABLES `activemq_acks` WRITE; /*!40000 ALTER TABLE `activemq_acks` DISABLE KEYS */; /*!40000 ALTER TABLE `activemq_acks` ENABLE KEYS */; UNLOCK TABLES;# # Source for table activemq_lock #DROP TABLE IF EXISTS `activemq_lock`; CREATE TABLE `activemq_lock` (`ID` bigint(20) NOT NULL,`TIME` bigint(20) DEFAULT NULL,`BROKER_NAME` varchar(250) DEFAULT NULL,PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;# # Dumping data for table activemq_lock #LOCK TABLES `activemq_lock` WRITE; /*!40000 ALTER TABLE `activemq_lock` DISABLE KEYS */; INSERT INTO `activemq_lock` VALUES (1,NULL,NULL); /*!40000 ALTER TABLE `activemq_lock` ENABLE KEYS */; UNLOCK TABLES;# # Source for table activemq_msgs #DROP TABLE IF EXISTS `activemq_msgs`; CREATE TABLE `activemq_msgs` (`ID` bigint(20) NOT NULL,`CONTAINER` varchar(250) DEFAULT NULL,`MSGID_PROD` varchar(250) DEFAULT NULL,`MSGID_SEQ` bigint(20) DEFAULT NULL,`EXPIRATION` bigint(20) DEFAULT NULL,`MSG` longblob,`PRIORITY` bigint(20) DEFAULT NULL,PRIMARY KEY (`ID`),KEY `ACTIVEMQ_MSGS_MIDX` (`MSGID_PROD`,`MSGID_SEQ`),KEY `ACTIVEMQ_MSGS_CIDX` (`CONTAINER`),KEY `ACTIVEMQ_MSGS_EIDX` (`EXPIRATION`),KEY `ACTIVEMQ_MSGS_PIDX` (`PRIORITY`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;# # Dumping data for table activemq_msgs #LOCK TABLES `activemq_msgs` WRITE; /*!40000 ALTER TABLE `activemq_msgs` DISABLE KEYS */; INSERT INTO `activemq_msgs` VALUES (1,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',1,0,X'0000010C1C0000000501017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000001000000000000000400000000000000010000000000000000040000000130450E28660001000000120000000E74657374206D657373616765203100000000000000000000000000000000000000000000000130450E28950000000000000000',4); INSERT INTO `activemq_msgs` VALUES (2,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',2,0,X'0000010C1C0000000601017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000002000000000000000500000000000000010000000000000000040000000130450E29020001000000120000000E74657374206D657373616765203200000000000000000000000000000000000000000000000130450E29020000000000000000',4); INSERT INTO `activemq_msgs` VALUES (3,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',3,0,X'0000010C1C0000000701017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000003000000000000000600000000000000010000000000000000040000000130450E29310001000000120000000E74657374206D657373616765203300000000000000000000000000000000000000000000000130450E29310000000000000000',4); INSERT INTO `activemq_msgs` VALUES (4,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',4,0,X'0000010C1C0000000801017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000004000000000000000700000000000000010000000000000000040000000130450E29500001000000120000000E74657374206D657373616765203400000000000000000000000000000000000000000000000130450E29500000000000000000',4); INSERT INTO `activemq_msgs` VALUES (5,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',5,0,X'0000010C1C0000000901017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000005000000000000000800000000000000010000000000000000040000000130450E298F0001000000120000000E74657374206D657373616765203500000000000000000000000000000000000000000000000130450E298F0000000000000000',4); INSERT INTO `activemq_msgs` VALUES (6,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',6,0,X'0000010C1C0000000A01017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000006000000000000000900000000000000010000000000000000040000000130450E29AE0001000000120000000E74657374206D657373616765203600000000000000000000000000000000000000000000000130450E29AE0000000000000000',4); INSERT INTO `activemq_msgs` VALUES (7,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',7,0,X'0000010C1C0000000B01017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000007000000000000000A00000000000000010000000000000000040000000130450E29ED0001000000120000000E74657374206D657373616765203700000000000000000000000000000000000000000000000130450E29ED0000000000000000',4); INSERT INTO `activemq_msgs` VALUES (8,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',8,0,X'0000010C1C0000000C01017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000008000000000000000B00000000000000010000000000000000040000000130450E2A0C0001000000120000000E74657374206D657373616765203800000000000000000000000000000000000000000000000130450E2A0C0000000000000000',4); INSERT INTO `activemq_msgs` VALUES (9,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',9,0,X'0000010C1C0000000D01017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A31000000000000000100000000000000010000000000000009000000000000000C00000000000000010000000000000000040000000130450E2A2B0001000000120000000E74657374206D657373616765203900000000000000000000000000000000000000000000000130450E2A2B0000000000000000',4); INSERT INTO `activemq_msgs` VALUES (10,'queue://ActiveMQ.QUEUE','ID:EASYWAY-SYSDEPARTMENT-1198-1306828613359-2:1:1:1',10,0,X'0000010D1C0000000E01017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001016401000E4163746976654D512E51554555450000016E017B01002F49443A454153595741592D5359534445504152544D454E542D313139382D313330363832383631333335392D323A3100000000000000010000000000000001000000000000000A000000000000000D00000000000000010000000000000000040000000130450E2A3B0001000000130000000F74657374206D65737361676520313000000000000000000000000000000000000000000000000130450E2A3B0000000000000000',4); /*!40000 ALTER TABLE `activemq_msgs` ENABLE KEYS */; UNLOCK TABLES;/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;轉載于:https://www.cnblogs.com/wuxi/p/3142287.html
總結
以上是生活随笔為你收集整理的ActiveMQ 持久化讯息数据库信息的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算几何相关资料+题目推荐(不定期补充)
- 下一篇: Android应用中Back键的监听及处