class SubscriptionService implements MqttClientEventHandler {

    @Override
    public void onConnect(final MqttClientAdapter mqttClientAdapter, final Mqtt3ConnAck ack,
            final Throwable throwable) {
        if (throwable == null) {
            this.onConnectSuccess(mqttClientAdapter, ack);
        } else {
            LOG.info(String.format("Client connect failed for device:%s",
                    mqttClientAdapter.getMessageMetadata().getDeviceIdentification()), throwable);
        }
    }

    public  SubscriptionService(final MqttDeviceRepository mqttDeviceRepository,
            final MqttClientAdapterFactory mqttClientAdapterFactory,
            final OutboundOsgpCoreResponseMessageSender outboundOsgpCoreResponseMessageSender,
            @Value("#{new Integer('${mqtt.broker.defaultPort}')}") final int defaultPort,
            @Value("${mqtt.broker.defaultTopics}") final String defaultTopics,
            @Value("${mqtt.broker.defaultQos}") final String defaultQos);

}