Camel Spring Boot Starter for consul

Spring Boot Auto-Configuration

When using consul with Spring Boot make sure to use the following Maven dependency to have support for auto configuration:

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

The component supports 90 options, which are listed below.

Name Description Default Type

camel.component.consul.acl-token

Sets the ACL token to be used with Consul

String

camel.component.consul.action

The default action. Can be overridden by CamelConsulAction

String

camel.component.consul.basic-property-binding

Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities

false

Boolean

camel.component.consul.block-seconds

The second to wait for a watch event, default 10 seconds

10

Integer

camel.component.consul.bridge-error-handler

Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. 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.consul.cluster.service.acl-token

String

camel.component.consul.cluster.service.attributes

Custom service attributes.

Map

camel.component.consul.cluster.service.block-seconds

Integer

camel.component.consul.cluster.service.connect-timeout

Duration

camel.component.consul.cluster.service.consistency-mode

ConsistencyMode

camel.component.consul.cluster.service.datacenter

String

camel.component.consul.cluster.service.enabled

Sets if the consul cluster service should be enabled or not, default is false.

false

Boolean

camel.component.consul.cluster.service.first-index

BigInteger

camel.component.consul.cluster.service.id

Cluster Service ID

String

camel.component.consul.cluster.service.near-node

String

camel.component.consul.cluster.service.node-meta

List

camel.component.consul.cluster.service.order

Service lookup order/priority.

Integer

camel.component.consul.cluster.service.password

String

camel.component.consul.cluster.service.ping-instance

Boolean

camel.component.consul.cluster.service.read-timeout

Duration

camel.component.consul.cluster.service.recursive

Boolean

camel.component.consul.cluster.service.root-path

String

camel.component.consul.cluster.service.session-lock-delay

Integer

camel.component.consul.cluster.service.session-refresh-interval

Integer

camel.component.consul.cluster.service.session-ttl

Integer

camel.component.consul.cluster.service.ssl-context-parameters

SSLContextParameters

camel.component.consul.cluster.service.tags

Set

camel.component.consul.cluster.service.url

String

camel.component.consul.cluster.service.user-name

String

camel.component.consul.cluster.service.write-timeout

Duration

camel.component.consul.configuration

Consul configuration. The option is a org.apache.camel.component.consul.ConsulConfiguration type.

String

camel.component.consul.connect-timeout

Connect timeout for OkHttpClient. The option is a java.time.Duration type.

String

camel.component.consul.consistency-mode

The consistencyMode used for queries, default ConsistencyMode.DEFAULT

ConsistencyMode

camel.component.consul.consul-client

Reference to a com.orbitz.consul.Consul in the registry. The option is a com.orbitz.consul.Consul type.

String

camel.component.consul.datacenter

The data center

String

camel.component.consul.enabled

Whether to enable auto configuration of the consul component. This is enabled by default.

Boolean

camel.component.consul.first-index

The first index for watch for, default 0. The option is a java.math.BigInteger type.

String

camel.component.consul.key

The default key. Can be overridden by CamelConsulKey

String

camel.component.consul.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.consul.near-node

The near node to use for queries.

String

camel.component.consul.node-meta

The note meta-data to use for queries.

List

camel.component.consul.password

Sets the password to be used for basic authentication

String

camel.component.consul.ping-instance

Configure if the AgentClient should attempt a ping before returning the Consul instance

true

Boolean

camel.component.consul.read-timeout

Read timeout for OkHttpClient. The option is a java.time.Duration type.

String

camel.component.consul.recursive

Recursively watch, default false

false

Boolean

camel.component.consul.service-registry.acl-token

String

camel.component.consul.service-registry.attributes

Custom service attributes.

Map

camel.component.consul.service-registry.block-seconds

Integer

camel.component.consul.service-registry.check-interval

Integer

camel.component.consul.service-registry.check-ttl

Integer

camel.component.consul.service-registry.connect-timeout

Duration

camel.component.consul.service-registry.consistency-mode

ConsistencyMode

camel.component.consul.service-registry.datacenter

String

camel.component.consul.service-registry.deregister-after

Integer

camel.component.consul.service-registry.deregister-services-on-stop

Boolean

camel.component.consul.service-registry.enabled

Sets if the consul service registry should be enabled or not, default is false.

false

Boolean

camel.component.consul.service-registry.first-index

BigInteger

camel.component.consul.service-registry.id

Service Registry ID

String

camel.component.consul.service-registry.near-node

String

camel.component.consul.service-registry.node-meta

List

camel.component.consul.service-registry.order

Service lookup order/priority.

Integer

camel.component.consul.service-registry.override-service-host

Boolean

camel.component.consul.service-registry.password

String

camel.component.consul.service-registry.ping-instance

Boolean

camel.component.consul.service-registry.read-timeout

Duration

camel.component.consul.service-registry.recursive

Boolean

camel.component.consul.service-registry.service-host

String

camel.component.consul.service-registry.ssl-context-parameters

SSLContextParameters

camel.component.consul.service-registry.tags

Set

camel.component.consul.service-registry.url

String

camel.component.consul.service-registry.user-name

String

camel.component.consul.service-registry.write-timeout

Duration

camel.component.consul.ssl-context-parameters

SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance. The option is a org.apache.camel.support.jsse.SSLContextParameters type.

String

camel.component.consul.tags

Set tags. You can separate multiple tags by comma.

String

camel.component.consul.url

The Consul agent URL

String

camel.component.consul.use-global-ssl-context-parameters

Enable usage of global SSL context parameters.

false

Boolean

camel.component.consul.user-name

Sets the username to be used for basic authentication

String

camel.component.consul.value-as-string

Default to transform values retrieved from Consul i.e. on KV endpoint to string.

false

Boolean

camel.component.consul.write-timeout

Write timeout for OkHttpClient. The option is a java.time.Duration type.

String

camel.component.consul.cluster.service.connect-timeout-millis

Deprecated

Long

camel.component.consul.cluster.service.dc

Deprecated

String

camel.component.consul.cluster.service.read-timeout-millis

Deprecated

Long

camel.component.consul.cluster.service.write-timeout-millis

Deprecated

Long

camel.component.consul.connect-timeout-millis

Deprecated Connect timeout for OkHttpClient. Deprecation note: Use connectTimeout instead

Long

camel.component.consul.read-timeout-millis

Deprecated Read timeout for OkHttpClient. Deprecation note: Use readTimeout instead

Long

camel.component.consul.service-registry.connect-timeout-millis

Deprecated

Long

camel.component.consul.service-registry.dc

Deprecated

String

camel.component.consul.service-registry.read-timeout-millis

Deprecated

Long

camel.component.consul.service-registry.write-timeout-millis

Deprecated

Long

camel.component.consul.write-timeout-millis

Deprecated Write timeout for OkHttpClient. Deprecation note: Use writeTimeout instead. The option is a java.lang.Long type.

String