protected void configureBroker(BrokerService brokerService) throws Exception {
    setPersistentAdapter(brokerService);
    brokerService.setAdvisorySupport(false);

    PolicyMap map = new PolicyMap();
    PolicyEntry defaultEntry = new PolicyEntry();
    defaultEntry.setMemoryLimit(1024 * 3);
    defaultEntry.setCursorMemoryHighWaterMark(68);
    defaultEntry.setExpireMessagesPeriod(0);
    map.setDefaultEntry(defaultEntry);
    brokerService.setDestinationPolicy(map);
  }