Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.此内容没有您所选择的语言版本。
Chapter 35. Guava EventBus
Guava EventBus Component 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Available since Camel 2.10.0
The Google Guava EventBus allows publish-subscribe-style communication between components without requiring the components to explicitly register with one another (and thus be aware of each other). The guava-eventbus: component provides integration bridge between Camel and Google Guava EventBus infrastructure. With the latter component, messages exchanged with the Guava
EventBus
can be transparently forwarded to the Camel routes. EventBus component allows also to route body of Camel exchanges to the Guava EventBus
.
Maven users will need to add the following dependency to their
pom.xml
for this component:
URI format 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
guava-eventbus:busName[?options]
guava-eventbus:busName[?options]
Where busName represents the name of the
com.google.common.eventbus.EventBus
instance located in the Camel registry.
Options 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Name | Default Value | Description |
---|---|---|
eventClass
|
null
|
*Camel 2.10:* If used on the consumer side of the route, will filter events received from the EventBus to the instances of the class and superclasses of eventClass . Null value of this option is equal to setting it to the java.lang.Object i.e. the consumer will capture all messages incoming to the event bus.
|
Usage 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Using
guava-eventbus
component on the consumer side of the route will capture messages sent to the Guava EventBus
and forward them to the Camel route. Guava EventBus consumer processes incoming messages asynchronously.
Using
guava-eventbus
component on the producer side of the route will forward body of the Camel exchanges to the Guava EventBus
instance.