将Spring Integration Router与Spring Cloud Stream一起使用

问题描述 投票:0回答:1

我一直在尝试将Spring Integration的@Router与带有Kafka绑定的Spring Cloud Stream一起使用。我的理解是,当您从用List注释的方法中返回频道名称@Router时,应将其生成给预定的Kafka主题。但是我看不到产生的消息。

Spring Integration的@Router是否与Spring Cloud Stream一起使用。如果不是,那有什么选择?如何以编程方式路由到运行时选择的通道?

spring-boot spring-integration spring-cloud-stream spring-cloud-stream-binder-kafka
1个回答
1
投票

什么使您相信Spring Integration @Router在Spring Cloud Stream中有任何作用?这是一个完全不同的框架。

是,在Spring Cloud Stream中有路由FROM和TO的机制,它们在here中进行了描述。

我认为您的用例感兴趣的特定部分是Routing FROM,但请考虑阅读完整的部分以了解所使用的差异和机制。

© www.soinside.com 2019 - 2024. All rights reserved.