strategy = (MQTTSubscriptionStrategy) STRATAGY_FINDER.newInstance(subscriptionStrategyName);
LOG.debug("MQTT Using subscription strategy: {}", subscriptionStrategyName);
if (strategy instanceof BrokerServiceAware) {
((BrokerServiceAware)strategy).setBrokerService(brokerService);
}
strategy.initialize(this);
} catch (Exception e) {
throw IOExceptionSupport.create(e);
}
} else {
throw new IOException("Invalid subscription strategy name given: " + subscriptionStrategyName);