Made connectOnMqttThread public