Bird
0
0

Identify the error in this Kafka client configuration snippet:

medium📝 Debug Q6 of 15
Kafka - Security
Identify the error in this Kafka client configuration snippet:
props.put("security.protocol", "SSL");
props.put("sasl.mechanism", "PLAIN");
A"sasl.mechanism" should be "sasl.mechanisms"
BNo error, configuration is correct
C"security.protocol" should be "PLAINTEXT" for SASL
D"security.protocol" should be "SASL_SSL" to use SASL with SSL
Step-by-Step Solution
Solution:
  1. Step 1: Check security.protocol value

    Using SASL with SSL requires "security.protocol" to be "SASL_SSL", not just "SSL".
  2. Step 2: Confirm sasl.mechanism property name

    The correct property is "sasl.mechanism" (singular), so that part is correct.
  3. Final Answer:

    "security.protocol" should be "SASL_SSL" to use SASL with SSL -> Option D
  4. Quick Check:

    Use SASL_SSL for SASL + SSL [OK]
Quick Trick: Use 'SASL_SSL' for combined SASL and SSL security [OK]
Common Mistakes:
MISTAKES
  • Using 'SSL' instead of 'SASL_SSL' for SASL with encryption
  • Confusing 'sasl.mechanism' with 'sasl.mechanisms'
  • Assuming 'PLAINTEXT' works with SASL

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes