Please ignore. I was using security.protocol=PLAINTEXT instead of security.protocol=SASL_PLAINTEXT and hence the issue.