You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Javier Freire Riobó (Jira)" <ji...@apache.org> on 2020/10/06 11:49:00 UTC

[jira] [Created] (KAFKA-10578) KIP-675: Convert KTable to a KStream using the previous value

Javier Freire Riobó created KAFKA-10578:
-------------------------------------------

             Summary: KIP-675: Convert KTable to a KStream using the previous value
                 Key: KAFKA-10578
                 URL: https://issues.apache.org/jira/browse/KAFKA-10578
             Project: Kafka
          Issue Type: Wish
          Components: streams
            Reporter: Javier Freire Riobó


Imagine that we have an entity for which we want to emit the difference between the current and the previous state. The simplest case would be that the entity was an integer number and you want to emit the subtraction between the current and previous values.

For example, for the input stream 4, 6, 3 the output 4 (4 - 0), 2 (6 - 4), -3 (3 - 6) is expected.

The way to achieve this with kafka streams would be through an aggregate.

The main problem, apart from needing more code, is that if the same event is received twice at the same time and the commit time is not 0, the difference is deleted and nothing is emitted.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)