Hi- 5.15.x is no longer actively supported by the community. If you are seeking community support, please upgrade to 5.18.1 and report back. There were a lot of SQL-based improvements since 5.15.9.
Thanks! Matt Pavlovich > On Jun 26, 2023, at 6:09 AM, ヤ艾枫o.-- <1169114...@qq.com.INVALID> wrote: > > Hello > When I used JDBC to connect MySQL to build a 2-node > master-slave, I found that the table ACTIVEMQ in the database_ LOCK No > data,5.15.9 version > > > ---activemq.log 2node the log is same----- > > 2023-06-26 18:27:30,140 | INFO | Refreshing > org.apache.activemq.xbean.XBeanBrokerFactory$1@1a968a59: startup date [Mon > Jun 26 18:27:30 CST 2023]; root of context hierarchy | > org.apache.activemq.xbean.XBeanBrokerFactory$1 | main > > 2023-06-26 18:27:31,116 | INFO | Using Persistence Adapter: > JDBCPersistenceAdapter(org.apache.commons.dbcp2.BasicDataSource@cb0755b) | > org.apache.activemq.broker.BrokerService | main > > 2023-06-26 18:27:31,651 | INFO | Database adapter driver override not > found for : [mysql_connector_j]. Will use default implementation. | > org.apache.activemq.store.jdbc.JDBCPersistenceAdapter | main > > 2023-06-26 18:27:31,756 | INFO | Database lock driver override not > found for : [mysql_connector_j]. Will use default implementation. | > org.apache.activemq.store.jdbc.JDBCPersistenceAdapter | main > > 2023-06-26 18:27:31,758 | INFO | Attempting to acquire the exclusive > lock to become the Master broker | > org.apache.activemq.store.jdbc.DefaultDatabaseLocker | main > > 2023-06-26 18:27:31,763 | INFO | Becoming the master on dataSource: > org.apache.commons.dbcp2.BasicDataSource@cb0755b | > org.apache.activemq.store.jdbc.DefaultDatabaseLocker | main > > 2023-06-26 18:27:31,766 | INFO | > PListStore:[/activemq-data/jjdbcBroker/tmp_storage] started | > org.apache.activemq.store.kahadb.plist.PListStoreImpl | main > > 2023-06-26 18:27:31,905 | INFO | Apache ActiveMQ 5.15.9 (jjdbcBroker, > ID:new234-rocketmq-master-1-edece-0.hde.com-35445-1687775251776-0:1) is > starting | org.apache.activemq.broker.BrokerService | main > > 2023-06-26 18:27:31,941 | INFO | Listening for connections at: > tcp://new234-rocketmq-master-1-edece-0.hde.com:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600 > | org.apache.activemq.transport.TransportServerThreadSupport | main > > 2023-06-26 18:27:31,943 | INFO | Connector default started | > org.apache.activemq.broker.TransportConnector | main > > 2023-06-26 18:27:31,944 | INFO | Apache ActiveMQ 5.15.9 (jjdbcBroker, > ID:new234-rocketmq-master-1-edece-0.hde.com-35445-1687775251776-0:1) started > | org.apache.activemq.broker.BrokerService | main > > 2023-06-26 18:27:31,945 | INFO | For help or more information please > see: http://activemq.apache.org | org.apache.activemq.broker.BrokerService | > main > > 2023-06-26 18:27:31,947 | WARN | Store limit is 102400 mb (current > store usage is 0 mb). The data directory: / only has 32509 mb of usable > space. - resetting to maximum available disk space: 32509 mb | > org.apache.activemq.broker.BrokerService | main > > 2023-06-26 18:27:31,948 | WARN | Temporary Store limit is 51200 mb > (current store usage is 0 mb). The data directory: / only has 32509 mb of > usable space. - resetting to maximum available disk space: 32509 mb | > org.apache.activemq.broker.BrokerService | main > > 2023-06-26 18:27:32,567 | INFO | No Spring WebApplicationInitializer > types detected on classpath | /admin | main > > 2023-06-26 18:27:32,663 | INFO | ActiveMQ WebConsole available at > http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | main > > 2023-06-26 18:27:32,664 | INFO | ActiveMQ Jolokia REST API available at > http://0.0.0.0:8161/api/jolokia/ | org.apache.activemq.web.WebConsoleStarter > | main > > 2023-06-26 18:27:32,708 | INFO | Initializing Spring FrameworkServlet > 'dispatcher' | /admin | main > > 2023-06-26 18:27:32,874 | INFO | No Spring WebApplicationInitializer > types detected on classpath | /api | main > > 2023-06-26 18:27:32,943 | INFO | jolokia-agent: Using policy access > restrictor classpath:/jolokia-access.xml | /api | main > > > > > > > > > > > -----activemq.xml---- > > > > <beans > > xmlns="http://www.springframework.org/schema/beans" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd > > http://activemq.apache.org/schema/core > http://activemq.apache.org/schema/core/activemq-core.xsd"> > > > > <!-- Allows us to use system properties as variables in > this configuration file --> > > <bean > class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> > > <property name="locations"> > > > <value>file:${activemq.conf}/credentials.properties</value> > > </property> > > </bean> > > > > <!-- Allows accessing the server log --> > > <bean id="logQuery" > class="io.fabric8.insight.log.log4j.Log4jLogQuery" > > lazy-init="false" > scope="singleton" > > init-method="start" > destroy-method="stop"> > > </bean> > > > > <!-- > > The <broker> element is used to > configure the ActiveMQ broker. > > --> > > <broker xmlns="http://activemq.apache.org/schema/core" > brokerName="jjdbcBroker"> > > > > <destinationPolicy> > > > <policyMap> > > > <policyEntries> > > > <policyEntry topic=">" > > > > <!-- The constantPendingMessageLimitStrategy is used to prevent > > > slow topic consumers to block producers and affect other consumers > > > by limiting the number of messages that are retained > > > For more information, see: > > > > > http://activemq.apache.org/slow-consumer-handling.html > > > > > --> > > > <pendingMessageLimitStrategy> > > > <constantPendingMessageLimitStrategy limit="1000"/> > > > </pendingMessageLimitStrategy> > > > </policyEntry> > > > </policyEntries> > > > </policyMap> > > </destinationPolicy> > > > > > > <!-- > > The > managementContext is used to configure how ActiveMQ is exposed in > > JMX. By > default, ActiveMQ uses the MBean server that is started by > > the JVM. > For more information, see: > > > > > http://activemq.apache.org/jmx.html > > --> > > <managementContext> > > > <managementContext createConnector="false"/> > > </managementContext> > > > > <!-- > > Configure > message persistence for the broker. The default persistence > > mechanism > is the KahaDB store (identified by the kahaDB tag). > > For more > information, see: > > > > > http://activemq.apache.org/persistence.html > > --> > > <persistenceAdapter> > > > <jdbcPersistenceAdapter dataDirectory="${activemq.base}/activemq-data" > dataSource="#mysql-ds" createTablesOnStartup="true"/> > > > > </persistenceAdapter> > > > > > > > > <!-- > > The > systemUsage controls the maximum amount of space the broker will > > use before > disabling caching and/or slowing down producers. For more information, see: > > > http://activemq.apache.org/producer-flow-control.html > > --> > > <systemUsage> > > > <systemUsage> > > > <memoryUsage> > > > <memoryUsage percentOfJvmHeap="70" /> > > > </memoryUsage> > > > <storeUsage> > > > <storeUsage limit="100 gb"/> > > > </storeUsage> > > > <tempUsage> > > > <tempUsage limit="50 gb"/> > > > </tempUsage> > > > </systemUsage> > > </systemUsage> > > > > <!-- > > The > transport connectors expose ActiveMQ over a given protocol to > > clients > and other brokers. For more information, see: > > > > > http://activemq.apache.org/configuring-transports.html > > --> > > <transportConnectors> > > <!-- DOS > protection, limit concurrent connections to 1000 and frame size to 100MB > --> > > > <transportConnector name="default" > uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> > > </transportConnectors> > > > > <!-- destroy the spring context on > shutdown to stop jetty --> > > <shutdownHooks> > > <bean > xmlns="http://www.springframework.org/schema/beans" > class="org.apache.activemq.hooks.SpringContextHook" /> > > </shutdownHooks> > > > > </broker> > > > > <!-- > > Enable web consoles, REST and Ajax > APIs and demos > > The web consoles requires by > default login, you can disable this in the jetty.xml file > > > > Take a look at > ${ACTIVEMQ_HOME}/conf/jetty.xml for more details > > --> > > <bean id="mysql-ds" > class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"> > > <property name="driverClassName" > value="com.mysql.jdbc.Driver"/> > > <property name="url" > value="jdbc:mysql://localhost:3306/activemq?relaxAutoCommit=true"/> > > <property name="username" > value="xxxxx"/> > > <property name="password" > value="xxxxx"/> > > <property > name="poolPreparedStatements" value="true"/> > > </bean> > > <import resource="jetty.xml"/> > > > > </beans> > > <!-- END SNIPPET: example -->