This chapter covers
- Learning about querying the state of a Kafka Streams application
- Discovering what’s required to enable Interactive Queries
- Building an Interactive Queries app with Spring Boot
Earlier in this book, you learned how to build stateful applications in Kafka Streams. When you enable a stateful operation like an aggregation, Kafka Streams creates a state store to hold the calculation results.
The point of running an aggregation or something similar is you need to gain information or insight from the combined values that it contains. For example, your application keeps track of failed login attempts. Too many indicate someone is trying to gain illegal entry into an account or machine. Another example of a less nefarious nature is tracking page views of a website to determine the most advantageous time to run ads. I could continue listing examples, but you understand. But you have to be able to view this information promptly for it to be helpful. Otherwise, it’s not worthwhile.
In this chapter, you’ll learn how to enable Interactive Queries (IQ) from your Kafka Streams applications. You’ll also learn how to build your web-based dashboard application with Spring Boot that will render the stateful results of a Kafka Streams example you previously created in the book.