Vert.x
Send and receive messages to and from an address on the Vert.x event bus.
What’s inside
-
Vert.x component, URI syntax:
vertx:address
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-vertx-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 10 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.vertx.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.vertx.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.vertx.enabled | Whether to enable auto configuration of the vertx component. This is enabled by default. | Boolean | |
camel.component.vertx.host | The host that the event bus binds to for the messages between the cluster nodes, when the component creates a clustered Vert.x instance. Setting it makes the component create a clustered instance, which needs a Vert.x cluster manager (such as vertx-hazelcast) on the classpath. When not set, the event bus binds to the host of the cluster manager. Not used when the vertx or vertxOptions option is set. | String | |
camel.component.vertx.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.vertx.port | The port that the event bus listens on for the messages between the cluster nodes, when the component creates a clustered Vert.x instance. A port above 0 makes the component create a clustered instance, which needs a Vert.x cluster manager (such as vertx-hazelcast) on the classpath. When not set (0), a clustered event bus uses a random port. Not used when the vertx or vertxOptions option is set. | Integer | |
camel.component.vertx.timeout | The time in seconds to wait for a clustered Vert.x instance, which the component creates, to be ready. The component fails to start when the instance is not ready in time. Must be a positive number. Not used for a non-clustered instance. | 60 | Integer |
camel.component.vertx.vertx | The Vert.x instance whose event bus the component uses, such as the instance the application already has. The component does not close it when it stops. When not set, the component creates its own Vert.x instance, which it closes when it stops; the host, port, timeout, vertxOptions and vertxFactory options only apply to an instance that the component creates. The option is a io.vertx.core.Vertx type. | Vertx | |
camel.component.vertx.vertx-factory | A custom Vert.x VertxBuilder that the component creates its Vert.x instance with, such as a builder with a cluster manager, metrics or tracing. The vertxOptions option is not applied to it. Setting host or port makes the component build a clustered instance with it, but their values are not passed to the builder. Not used when the vertx option is set. The option is a io.vertx.core.VertxBuilder type. | VertxBuilder | |
camel.component.vertx.vertx-options | The VertxOptions that the component creates its Vert.x instance with. When set, the host and port options are not used, and the component creates a non-clustered instance. Not used when the vertx or vertxFactory option is set. The option is a io.vertx.core.VertxOptions type. | VertxOptions |