-
Notifications
You must be signed in to change notification settings - Fork 302
Unable to start processor when using KTable as output #1085
Comments
@selcuksert At the moment, the Kafka Streams binder does not support table types on the outbound? Is there a compelling reason for this requirement? This can easily be addressed by changing the output type as |
@sobychacko Thanks for the feedback. Actually the aim is to store data using KTable state store as the index space is large and query it utilizing Per your suggestion I appended In any case, I really appreciate your efforts and enabling the capability of Kafka Streams utilization for Spring Framework ecosystem. |
@selcuksert That context is helpful, especially around the log compacted topics and conserving storage on the broker. I will keep this issue open to thinking through this. Maybe we can indeed provide this as an enhancement in the binder. Thank you! |
At the moment, Kafka Streams binder only allows KStream bindings on the outbound. There is a delegation mechanism in which we stil can use KStream for output binding while allowing the applications to provide a KTable type as the function return type. Update docs. Resolves spring-attic#1085
@selcuksert We added the ability to have |
Describe the issue
For a
BiFunction
processor (also reproducible forFunction
processors) that outputsKTable
, the processor bean cannot be initialized due to class cast exception:Version of the framework
Expected behavior
The processor should start. It was working with
org.springframework.cloud:spring-cloud-stream-binder-kafka-streams:3.0.12.RELEASE
Additional context
The processor snippet:
Configuration:
As the
result
was casted withKStream
, following snippet causesClassCastException
for output bindings of KTable:https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/blob/9e4a1075d437f2e6aa7dad0a38d8286de94234a4/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsFunctionProcessor.java#L322
Is there a new/known limitation on using output binding of
KTable
with the new version of binder?The text was updated successfully, but these errors were encountered: