logger.getRootLogger().addAppender(appender);
try {
BrokerService broker = new BrokerService();
LoggingBrokerPlugin loggingBrokerPlugin = new LoggingBrokerPlugin();
loggingBrokerPlugin.setPerDestinationLogger(true);
loggingBrokerPlugin.setLogAll(true);
broker.setPlugins(new LoggingBrokerPlugin[]{loggingBrokerPlugin});
broker.start();
Connection connection = new ActiveMQConnectionFactory(broker.getVmConnectorURI()).createConnection();