Hello everyone

I have the following use case:

I have two Kafka topics, one is meant to be used as a stream of incoming
messages to be processed, the other is meant as a store of records that is
meant to be used as a bootstrap to the initial state of the application.

Is there a way to do the following:

1. Read all messages from a Kafka topic when the application starts up and
store all ConsumerRecord in memory from the topic that is meant to
bootstrap the application to its initial state
2. Only after all messages have been read allow the ConsumerRecord from the
stream topic to be processed
3. As there may be additional records on the state topic to incorporate
them into the application's state when the application is running without
having to restart the application.

The issue I am having is how do I read the entire topic in its entirety and
populate the KTable? Every time that my application starts in order to
reach its initial state I need to consume all the messages that are on the
topic from the very beginning prior to my application processing messages
from another topic.

Thanks!

Reply via email to