In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following mainly brings you the detailed steps of persistence of Apache ActiveMQ messages to MySQL database. I hope that the detailed steps of persistence of Apache ActiveMQ messages to MySQL database can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.
ActiveMQ provides a variety of data persistence methods: either to a file or to a database, where the database can support both MySQL and Oracle types.
The default is the way to persist to a file, that is, in the activemq.xml file:
two。 Steps
This article focuses on the configuration method that is persisted to MySQL:
2.1Add MySQL driver
First of all, you need to put the driver of MySql into the Lib directory of ActiveMQ. The file name I use is:
Mysql-connector-java-5.1.30-bin.jar
Commons-pool-1.6.jar
Commons-dbcp-1.4.jar
2.2 modify the configuration file activemq.xml
Configure this paragraph:
Modify it to the following paragraph:
After the node, add the configuration of the data source as follows:
2.3 create a new database
You can see from the configuration that the name of the database is test_mq, and you need to manually create an empty database for test_mq in MySql.
At this point, restart MQ, you will find that there are three more tables in the test_mq library: activemq_acks,activemq_lock,activemq_msgs,OK, indicating that the persistence has been successful!
Do you find it very helpful to persist the above message about Apache ActiveMQ to the detailed steps of MySQL database? If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.