PolicyMap policyMap = new PolicyMap();
PolicyEntry policy = new PolicyEntry();
// don't apply the same memory limit as the master in this case
//policy.setMemoryLimit(10);
policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
policy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
policy.setProducerFlowControl(true);
policyMap.setDefaultEntry(policy);
slave.setDestinationPolicy(policyMap);
slave.setMasterConnectorURI(connector.getConnectUri().toString());