Recall & Review
beginner
What is the main purpose of interactive queries in Kafka Streams?
Interactive queries allow you to directly query the state stores of a Kafka Streams application to get real-time data without needing to go through Kafka topics.
Click to reveal answer
intermediate
How do you access a local state store in Kafka Streams for interactive queries?
You use the KafkaStreams#store() method with the store name and queryable store type to get a handle to the local state store.
Click to reveal answer
beginner
What is a key benefit of using interactive queries instead of querying Kafka topics directly?
Interactive queries provide low-latency, real-time access to aggregated or processed data stored locally, avoiding the overhead of consuming and processing raw Kafka topic data again.
Click to reveal answer
intermediate
What happens if the requested key is not found in the local state store during an interactive query?
If the key is not found locally, you can use Kafka Streams metadata APIs to find which instance has the key and then query that instance remotely.
Click to reveal answer
beginner
Name two types of state stores that can be queried interactively in Kafka Streams.
KeyValueStore and WindowStore are two common types of state stores that support interactive queries.
Click to reveal answer
What method is used to access a local state store for interactive queries in Kafka Streams?
✗ Incorrect
KafkaStreams#store() is the method to access local state stores for interactive queries.
Which of the following is NOT a benefit of interactive queries?
✗ Incorrect
Interactive queries do not allow direct modification of Kafka topic data; they provide read access to local state stores.
If a key is not found in the local state store, what can Kafka Streams do?
✗ Incorrect
Kafka Streams can use metadata APIs to locate the instance holding the key and query it remotely.
Which store type supports windowed data in interactive queries?
✗ Incorrect
WindowStore supports windowed data and can be queried interactively.
Interactive queries are primarily used in which Kafka component?
✗ Incorrect
Interactive queries are a feature of Kafka Streams to query local state stores.
Explain what interactive queries are in Kafka Streams and why they are useful.
Think about how you get data directly from your app's memory instead of reading from Kafka topics.
You got /4 concepts.
Describe the process Kafka Streams uses when a requested key is not found locally during an interactive query.
Consider how the app finds the right place to get the data if it’s not on the current machine.
You got /4 concepts.