views:

27

answers:

3

I am using Active MQ for integration testing my application. I have defined an active-mq broker in a spring config like so:

<amq:broker useJmx="false" 
           persistent="false" 
           deleteAllMessagesOnStartup="true" 
           useShutdownHook="true">

    <amq:transportConnectors>
        <amq:transportConnector uri="tcp://localhost:0"/>
    </amq:transportConnectors>
</amq:broker>

But it seems to be ignoring persistent=false and every time I run the test suite I get a folder created called activemq-data

What do I need to do so that Active MQ is not persistent?

A: 

I would use ActiveMQ 5.3.2 - this looks like an older release. Btw - you don't need to deleteAllMessagesOnStartup - as you won't be using a persistent message store

cheers,

Rob

Rob Davies
I am now using 5.3.2 and get the same result. (And how would you know I wasn't, the spring context doesn't change?)
Paul McKenzie
A: 

According to this post, it's a bug

Paul McKenzie
A: 

The solution, in addition to adding the persistant="false" is to comment out the following lines in your activemq.xml:

 <persistenceAdapter>
            <kahaDB directory="${activemq.base}/data/kahadb"/>
 </persistenceAdapter>

Also, doesn't hurt at this point to purge your data directory...

Jeremy