第 128 章 Guava EventBus Component

作为 Camel 2.10 版本提供

Google Guava EventBus 允许在组件之间发布订阅式通信,而无需组件显式注册到另一个组件(因此可以相互发现)。guava-eventbus: 组件提供 Camel 和 Google Guava EventBus 基础架构之间的集成网桥。通过后面的组件,与 Guava EventBus 交换的消息可以透明地转发到 Camel 路由。EventBus 组件还允许将 Camel 交换的正文路由到 Guava EventBus

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

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

128.1. URI 格式

guava-eventbus:busName[?options]

其中 busName 代表 Camel registry 中的 com.google.common.eventbus.EventBus 实例的名称。