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?
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...
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
Even on commenting the persistent adapter, it creates that directory. When is et broker.persistent=false
in the broker URL, though, the persistence gets disabled. I'm still wondering why, and at this point, this is in 5.4.2.
精彩评论