liveBook · Manning

QueryResult

As explained in Kafka Streams in Action, Second Edition

StateQueryResult is a Kafka Streams response object containing the results of a state-store query by partition.

QueryResult represents the result associated with one partition of a Kafka Streams state-store query. A StateQueryResult stores these results in a map keyed by partition, letting a key query extract one result or a multipartition query process each entry. section 13.2.1

Use the result according to the query scope:

  • Do not use single-partition extraction when multiple partition results are possible; it throws an exception. section 13.2.1

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Distinguishes single-partition extraction from map iteration but does not detail QueryResult internals.
Examples
Uses a loan-category KeyQuery to extract a LoanAppRollup for a web view.
What it assumes
Assumes Kafka Streams queries, state stores, partitions, and KeyQuery metadata.
What you can do after
Apply it via Kafka Streams to extract single-partition values or process multipartition results.
How it connects
Connects state stores, StateQueryResult, KeyQuery, partitions, and interactive queries.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.