props.put("security.protocol","SASL_PLAINTEXT"); props.put("sasl.mechanism","PLAIN"); props.put("sasl.jaas.config","org.apache.kafka.common.security.plain.PlainLoginModule required username=\"myuser\" password=\"mypassword\";");