搜索

此内容没有您所选择的语言版本。

Chapter 181. Vertx

download PDF

Vertx Component

Available as of Camel 2.12
The vertx component is for working with the Vertx EventBus.
The vertx EventBus sends and receives JSON events.
Maven users will need to add the following dependency to their pom.xml for this component:
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-vertx</artifactId>
    <version>2.17.0.redhat-630xxx</version>
    <!-- use the same version as your Camel core version -->
</dependency>
Note
From Camel 2.16 onwards, uses Vertx 3 which requires Java 8 at run time.

URI format

vertx:channelName[?options]
You can append query options to the URI in the following format, ?option=value&amp;option=value&amp;...

Options

Name
Default Value
Description
pubSub
false
Camel 2.12.3: Whether to use publish/subscribe instead of point to point when sending to a vertx endpoint.

Connecting to the existing Vert.x instance

If you would like to connect to the Vert.x instance already existing in your JVM, you can set the instance on the component level:
Vertx vertx = ...;
VertxComponent vertxComponent = new VertxComponent();
vertxComponent.setVertx(vertx);
camelContext.addComponent("vertx", vertxComponent);
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.