When the connection receives a broker error of type java.lang.SecurityException its translating it to a InvalidClientIdException which is incorrect, it should be an NMSSecurityException.