Bird
0
0

Which Kafka topic setup correctly follows the CQRS pattern?

easy📝 Syntax Q12 of 15
Kafka - Event-Driven Architecture
Which Kafka topic setup correctly follows the CQRS pattern?
AOne topic for all commands, events, and queries
BOne topic for commands and a separate topic for events
CMultiple topics for queries only
DNo topics, just direct database writes
Step-by-Step Solution
Solution:
  1. Step 1: Recall CQRS topic separation

    CQRS uses separate topics for commands (writes) and events (results of commands) to keep communication clear.
  2. Step 2: Evaluate options

    One topic for commands and a separate topic for events correctly separates commands and events into different topics, matching CQRS principles.
  3. Final Answer:

    One topic for commands and a separate topic for events -> Option B
  4. Quick Check:

    Separate topics for commands and events = One topic for commands and a separate topic for events [OK]
Quick Trick: Separate commands and events into different topics [OK]
Common Mistakes:
  • Mixing commands and queries in one topic
  • Ignoring event topics
  • Using no Kafka topics at all

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes