Bird
Raised Fist0

Why is it important to avoid setting Kafka configuration properties directly in application code?

easy🧠 Conceptual Q2 of Q15
Kafka - with Java/Python
Why is it important to avoid setting Kafka configuration properties directly in application code?
AIt automatically secures the configuration
BIt improves application performance
CIt makes the code harder to maintain and update
DIt reduces the number of configuration files
Step-by-Step Solution
Solution:
  1. Step 1: Consider maintainability of code

    Hardcoded configs require code changes for updates, increasing effort and risk.
  2. Step 2: Understand best practice for configuration management

    Configurations should be external to code for flexibility and easier updates.
  3. Final Answer:

    It makes the code harder to maintain and update -> Option C
  4. Quick Check:

    Code maintainability = Avoid hardcoding configs [OK]
Quick Trick: Keep configs outside code for easy updates [OK]
Common Mistakes:
MISTAKES
  • Thinking hardcoding improves performance
  • Assuming hardcoding secures configs
  • Believing fewer files means better management

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes