connectionInfo.setClientId(clientId);
} else {
// Clean Session MUST be set for 0 length Client Id
if (!connect.cleanSession()) {
CONNACK ack = new CONNACK();
ack.code(CONNACK.Code.CONNECTION_REFUSED_IDENTIFIER_REJECTED);
try {
getMQTTTransport().sendToMQTT(ack.encode());
getMQTTTransport().onException(IOExceptionSupport.create("Invalid Client ID", null));
} catch (IOException e) {
getMQTTTransport().onException(IOExceptionSupport.create(e));