Bird
0
0

How can you combine interactive queries with Kafka Streams' REST API to serve state store data in a distributed application?

hard📝 Application Q9 of 15
Kafka - Advanced Stream Processing

How can you combine interactive queries with Kafka Streams' REST API to serve state store data in a distributed application?

AStore all data in a centralized database and query it via REST
BUse REST API to write data directly to Kafka topics
CUse REST API only for configuration, not for querying data
DExpose endpoints that query local state stores and forward requests to other instances if needed
Step-by-Step Solution
Solution:
  1. Step 1: Understand distributed querying with interactive queries

    Each Kafka Streams instance holds part of the state; queries may need to be forwarded.
  2. Step 2: Use REST API to expose local queries and forward requests

    REST endpoints can query local stores and forward to other instances to get full data.
  3. Final Answer:

    Expose endpoints that query local state stores and forward requests to other instances if needed -> Option D
  4. Quick Check:

    Distributed queries = REST + forwarding [OK]
Quick Trick: Use REST to query local stores and forward to others [OK]
Common Mistakes:
MISTAKES
  • Using REST only for writes
  • Ignoring forwarding in distributed apps
  • Centralizing data unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes