第 272 章 Reactive Streams 组件

作为 Camel 版本 2.19 可用

reactive -streams: 组件允许您使用与被动流标准兼容的 被动 流处理库交换信息。

组件支持 backpressure,并且已使用 reactive Streams 技术兼容性套件(TCK) 进行测试。

Camel 模块提供了一个 被动(active-streams )组件,允许用户在 Camel 路由中定义传入和传出流,以及直接客户端 API,允许直接使用 Camel 端点进入任何外部被动框架。

Camel 使用被动流 发布程序 和订阅程序的内部实现,因此它不与任何特定的框架绑定。在集成测试中使用了以下被动框架: Reactor Core 3,RxJava 2

Maven 用户需要将以下依赖项添加到其 pom.xml 中:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-reactive-streams</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

272.1. URI 格式

reactive-streams://stream?[options]

其中 stream 是用于将 Camel 路由绑定到外部流处理系统的逻辑流名称。