this is very wrong! To narrow down the problem, try using embedded derby for a quick test, use <jdbcPersistenceAdapter />
Also, can you post the logs of a broker restart, enable TRACE level logging for org.apache.activemq It may make sense to open a jira issue to track this till we get to the bottom of it. On 9 August 2011 00:16, pol_ice <pavel.grit...@gmail.com> wrote: > Hi there, > > I am experiencing problem with activemq restarting. Whenever it is restarted > no messages, queues or topics remain. > I an using ms sql server for persistence and I see all messages successfully > saved in db, after the activemq service is restarted - number of messaged in > db remains to be the same - but admin panel shows nothing - meaning there > are no messages or queues previously created. > > I saw a number of questions about it in the forum, but none of them helped. > > Here is my activemq settings file: > > ------------------------------------- > <beans > xmlns="http://www.springframework.org/schema/beans" > xmlns:amq="http://activemq.apache.org/schema/core" > 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-2.0.xsd > http://activemq.apache.org/schema/core > http://activemq.apache.org/schema/core/activemq-core.xsd"> > > <bean > class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> > <property name="locations"> > <value>file:${activemq.base}/conf/credentials.properties</value> > </property> > </bean> > > <bean id="mssql-ds" class="org.apache.commons.dbcp.BasicDataSource" > destroy-method="close"> > <property name="driverClassName" > value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> > <property name="url" > value="jdbc:sqlserver://localhost:1433;databaseName=Notifications;user=sa;password=pass"/> > <property name="username" value="sa"/> > <property name="password" value="pass"/> > </bean> > > <broker xmlns="http://activemq.apache.org/schema/core" > brokerName="localhost" dataDirectory="${activemq.base}/data" > destroyApplicationContextOnStop="true" useJmx="true" persistent="true" > deleteAllMessagesOnStartup="false"> > > > <destinationPolicy> > <policyMap> > <policyEntries> > > </policyEntry --> > <policyEntry queue=">" > producerFlowControl="false" memoryLimit="1mb" > expireMessagesPeriod="100000" gcInactiveDestinations="true" > inactiveTimoutBeforeGC="30000"> > <deadLetterStrategy> > <individualDeadLetterStrategy > queuePrefix="DLQ." > useQueueForTopicMessages="true" useQueueForQueueMessages="true" > processExpired="false" processNonPersistent="false"/> > </deadLetterStrategy> > </policyEntry> > </policyEntries> > </policyMap> > </destinationPolicy> > > > <managementContext> > <managementContext connectorPort="11099" > rmiServerPort="11119" jmxDomainName="org.apache.activemq"/> > </managementContext> > > <persistenceAdapter> > <jdbcPersistenceAdapter dataSource="#mssql-ds" > useDatabaseLock="false"> > <adapter><transact-jdbc-adapter/></adapter> > </jdbcPersistenceAdapter> > </persistenceAdapter> > > <systemUsage> > <systemUsage> > <memoryUsage> > <memoryUsage limit="1mb"/> > </memoryUsage> > <storeUsage> > <storeUsage limit="20 gb"/> > </storeUsage> > <tempUsage> > <tempUsage limit="1 gb"/> > </tempUsage> > </systemUsage> > </systemUsage> > > > <transportConnectors> > <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/> > </transportConnectors> > > </broker> > > <import resource="jetty.xml"/> > > </beans> > ------------------------------------- > > I have read that camel can clear the messages, so I have commented it out in > jetty.xml as well, but since no queues remain after restart I believe it is > not that messages were dequeued, but something is clearing the whole > topic/queue structure upon activemq restart. > > Any clues? It is required if messages were enqueued, they are still > available for consumers if activemq service is restarted. > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Restarting-ActiveMq-removes-cleans-all-persisted-messages-queues-topics-tp3728577p3728577.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- http://fusesource.com http://blog.garytully.com