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