【发布时间】:2021-07-16 02:40:17
【问题描述】:
我正在努力寻找关于我可以在哪里使用 Spring Cloud Streams 的任何文档,该文档采用 Kafka 主题并将其放入 KTable。
例如,在此处https://cloud.spring.io/spring-cloud-static/spring-cloud-stream-binder-kafka/3.0.0.RC1/reference/html/spring-cloud-stream-binder-kafka.html#_materializing_ktable_as_a_state_store 上查找文档后,在 Spring Boot 中使用注释执行此操作的方式没有什么非常具体的。
我希望我可以使用 KStream 创建一个简单的 KTable,在我的 application.properties 中我有这个:
spring.cloud.stream.bindings.process-in-0.destination: my-topic
然后在我的配置中,我希望我能做这样的事情
@Bean
public Consumer<KStream<String, String>> process() {
return input -> input.toTable(Materialized.as("my-store"))
}
请告知我缺少什么?
【问题讨论】:
标签: spring-cloud spring-cloud-stream spring-cloud-stream-binder-kafka