title: KTable not deduplicating the incoming records with same keys
body: <p>I am trying to deduplicate the records using input topic as KTable and sinking them to output topic. But the KTable is still sinking the duplicate records to the output topic. Not  sure where am I going wrong.</p>
  <p>Here is my application.yml</p>
  <pre><code>spring:
    cloud:
      stream:
        function:
          bindings:
            process-in-0: input.topic
            process-out-0: output.topic
          definition: process
        kafka:
          streams:
            bindings:
              process-in-0:
                consumer:
                  materializedAs: incoming-store
            binder:
              application-id: spring-cloud-uppercase-app
              brokers: localhost:9092
              configuration:
                commit:
                  interval:
                    ms: 1000
                  state.dir: state-store
                default:
                  key:
                    serde: org.apache.kafka.common.serialization.Serdes$StringSerde
                  value:
                    serde: org.apache.kafka.common.serialization.Serdes$StringSerde
  </code></pre>
  <p>As per the spring cloud stream kafka stream <a href="https://docs.spring.io/spring-cloud-stream-binder-kafka/docs/3.1.1/reference/html/spring-cloud-stream-binder-kafka.html#_state_store" rel="nofollow noreferrer">documentation</a> about state store, I have added the materialized view above as <code>incoming-store</code></p>
  <p>The process() bean function takes the input topic as KTable and and sink it to output topic</p>
  <pre class="lang-java prettyprint-override"><code>
      @Bean
      public Function&lt;KTable&lt;String, String&gt;, KStream&lt;String, String&gt;&gt; process(){
          return table -&gt; table
                  .toStream()
                  .peek((k, v) -&gt; log.info(&quot;Received key={}, value={}&quot;, k, v));
      }
  
  </code></pre>
  <p>For a given input of 4 records</p>
  <pre><code>key=111, value=&quot;a&quot;
  key=111, value=&quot;a&quot;
  key=222, value=&quot;b&quot;
  key=111, value=&quot;a&quot;
  </code></pre>
  <p>I am expecting to get only 2 records</p>
  <pre><code>key=111, value=&quot;a&quot;
  key=222, value=&quot;b&quot;
  </code></pre>
  <p>But getting all the 4 records. Any help would be really appreciated!</p>