Description
Currently the MQTT protocol converter doesn't really try to map connection error into the MQTT spec codes. We need to distinguish between bad client Ids and authentication issues. We should return codes that match these error conditions
InvalidClientIdException - 0x02 Connection Refused, identifier rejected
CredentialException - 0x04 Connection Refused, bad user name or password
SecurityException - 0x05 Connection Refused, not authorized