diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index 56ed5be84f..07d86e6ad3 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -1332,6 +1332,9 @@ public class BrokerService implements Service, Serializable { // we must start the persistence adaptor before we can create the region // broker getPersistenceAdapter().setUsageManager(getProducerUsageManager()); + if(this.deleteAllMessagesOnStartup){ + getPersistenceAdapter().deleteAllMessages(); + } getPersistenceAdapter().start(); DestinationInterceptor destinationInterceptor = null;