I have done more tests. 

1) I've restored all conf files to defaults of ActiveMq 5.5.0 out-of-box.
Verified the existing code, so that it sends messages to virtual topics and
consumer can successfully receive them from the consumers' queues. All
messages are sent as persistent.
By default KahaDB persistence is used, and restarting the activemq results
as expected - queues and not consumed messages are there.

2) Next, I only replace KahaDb persistence settings with mssql using the
following:

<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=Test;user=activemq;password=activemq@@123"/>
                <property name="username" value="activemq"/>
                <property name="password" value="activemq@@123"/>
        </bean>

and

persistenceAdapter>
                        <jdbcPersistenceAdapter  dataSource="#mssql-ds" 
useDatabaseLock="false">
                                <adapter><transact-jdbc-adapter/></adapter>
                        </jdbcPersistenceAdapter>
                </persistenceAdapter>

All messages are sent and displayed as they should - but when restarting the
activemq service - I get nothing - no queues/topics or anything else.

And by looking in the log I can tell that my topics are expiring - but why?
Did I specify anything to expire them?

----------------------
 DEBUG |
queue://Consumer.funcTestOne-634484898415831284.VirtualTopic.SM.Company
expiring messages .. | org.apache.activemq.broker.region.Queue | ActiveMQ
Broker[localhost] Scheduler
2011-08-09 12:33:11,698 | DEBUG |
Consumer.funcTestOne-634484898415831284.VirtualTopic.SM.Company toPageIn: 2,
Inflight: 0, pagedInMessages.size 0, enqueueCount: 3, dequeueCount: 1 |
org.apache.activemq.broker.region.Queue | ActiveMQ Broker[localhost]
Scheduler
2011-08-09 12:33:11,698 | DEBUG |
queue://Consumer.funcTestOne-634484898415831284.VirtualTopic.SM.Company
expiring messages done. | org.apache.activemq.broker.region.Queue | ActiveMQ
Broker[localhost] Scheduler
2011-08-09 12:33:11,698 | DEBUG |
Consumer.funcTestOne-634484898415831284.VirtualTopic.SM.Company toPageIn: 2,
Inflight: 0, pagedInMessages.size 0, enqueueCount: 3, dequeueCount: 1 |
org.apache.activemq.broker.region.Queue |
Queue:Consumer.funcTestOne-634484898415831284.VirtualTopic.SM.Company
2011-08-09 12:33:12,587 | DEBUG | EOF | org.eclipse.jetty.util.log |
qtp1147380142-24
2011-08-09 12:33:13,367 | DEBUG |
queue://Consumer.funcTestOne-634484898423475725.VirtualTopic.SM.Roster
expiring messages .. | org.apache.activemq.broker.region.Queue | ActiveMQ
Broker[localhost] Scheduler
2011-08-09 12:33:13,367 | DEBUG |
Consumer.funcTestOne-634484898423475725.VirtualTopic.SM.Roster toPageIn: 0,
Inflight: 0, pagedInMessages.size 0, enqueueCount: 2, dequeueCount: 2 |
org.apache.activemq.broker.region.Queue | ActiveMQ Broker[localhost]
Scheduler
2011-08-09 12:33:13,367 | DEBUG |
queue://Consumer.funcTestOne-634484898423475725.VirtualTopic.SM.Roster ee. |
org.apache.activemq.broker.region.Queue | ActiveMQ Broker[localhost]
Scheduler
2011-08-09 12:33:15,770 | DEBUG | Cleaning up expired web clients. |
org.apache.activemq.web.MessageListenerServlet | Timer-1
--------------------------


--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Restarting-ActiveMq-removes-cleans-all-persisted-messages-queues-topics-tp3728577p3731096.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to