0

I have made the sample program convert the stream to Ktable. when I output the stream it always give me same number of result if I produce same message with same key any number of time

Input

  • key1- value1
  • key1-value1
  • key2-value2

Actual output

  • key1- value1
  • key1-value1
  • key2-value2

Expected output

  • key1-value1
  • key2-value2
    @Bean
    public java.util.function.Function<KStream<String, WorkInstructionEvent1>, KStream<String, WorkInstructionEvent1>> inputStream() {
                return stream ->
                        stream.toTable(Materialized.<String, WorkInstructionEvent1, KeyValueStore<Bytes, byte[]>>as("new-table")
                                .withValueSerde(CustomeSerdes.WorkInstructionEvent1Serdes()).withKeySerde(Serdes.String())).toStream();
            }

here is the spring propeties file

spring.cloud.stream.bindings.inputStream-in-0.destination=inputStream-in-0
spring.cloud.stream.bindings.inputStream-out-0.destination=inputStream-out-0

If I send the same message two times in the inputStream-in-0 it will output the same message two times in the inputStream-out-0

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • I need clarification on what the issue is. Can you please edit the question so we know what the expected behavior is vs. what you see? – sobychacko Jan 23 '23 at 18:44
  • I have updated the text you can see now input and actual output and expected output . – abhinav jain Jan 23 '23 at 22:24
  • There's a similar issue for KTable-KTable joins: https://issues.apache.org/jira/browse/KAFKA-6599 .... could you tell me what happens when you disable caching on the state store? – cmcnealy Jan 24 '23 at 12:47

0 Answers0