activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pol_ice <pavel.grit...@gmail.com>
Subject Restarting ActiveMq removes/cleans all persisted messages/queues/topics
Date Mon, 08 Aug 2011 23:16:57 GMT
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.

Mime
View raw message