I am new in Kafka stream, my use case is to compare the value of each individual incoming record from input topic with value from its individual precede record, and, if a comparison condition is true then send new record containing a comparison result with an index of each compared records into result topic, else do not send anything. (note that all incoming records may have a unique Key for each record or null key).
Doing this in Kafka consumer and producer API is very easy, but ((without using external DB to store the preceding record)) I try to use (Kafka streams DSL API) only, (which include KTable and KStream, with them internal methods such as, aggregate, reduce .. etc) but maybe because I am a beginner so I did not find a clear way to access (internal state store) in these API in order to store state and retrieve the previous record state in order to compare it with current one, then after store the current record instead of old one in order to compare it with the next incoming record. A few approaches try to use Processor API instead of Stream DSL API, but it includes much complexity and I did not fully understand it. This why I try to solve my problem with Stream DSL API. But till now I did not succeed, unfortunately.
Actually, until now I did not succeed. can you help me, please by providing me with detailed code example to get this done using Kafka Stream DSL?