我使用apache-kafka和web通量(spring ),我想知道是否有一种方法可以为我在KafkaListener (或属性)中添加的每个主题自动创建一个application.yml。
发布于 2022-06-15 23:50:21
这不是消费者的目的。卡夫卡的话题是一股不断变化的数据流。该http请求的业务目的是什么?也许您想将这样的主题请求流到Flux?然后考虑使用及其toReactivePublisher()特性:
https://docs.spring.io/spring-integration/docs/current/reference/html/reactive-streams.html#java-dsl
这个示例展示了一些关于Kafka和动态流的东西:https://github.com/spring-projects/spring-integration-samples/tree/main/dsl/kafka-dsl。
另外,本文还演示了一些“to WebFlux”技术:https://github.com/artembilan/sandbox/tree/master/amqp-to-webflux。
或者你可以看看卡夫卡反应堆:https://projectreactor.io/docs/kafka/release/reference/。
https://stackoverflow.com/questions/72622804
复制相似问题