Show Table of Contents
Chapter 181. Vertx
Vertx Component
Available as of Camel 2.12
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-630187</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&option=value&...
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);
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.