broker.setDeleteAllMessagesOnStartup(true);
PolicyEntry policy = new PolicyEntry();
policy.setTopic(">");
policy.setProducerFlowControl(false);
policy.setMemoryLimit(1 * 1024 * 1024);
policy.setPendingSubscriberPolicy(new FilePendingSubscriberMessageStoragePolicy());
policy.setSubscriptionRecoveryPolicy(new LastImageSubscriptionRecoveryPolicy());
policy.setExpireMessagesPeriod(500);
List<PolicyEntry> entries = new ArrayList<PolicyEntry>();
entries.add(policy);