Skip navigation links

Package io.vertx.servicediscovery.backend.consul

=== Consul backend

See: Description

Package io.vertx.servicediscovery.backend.consul Description

=== Consul backend

The service discovery has a plug-able backend using the ServiceDiscoveryBackend SPI. This is an implementation of the SPI based on Consul.

==== Using the Consul backend

To use the Consul backend, add the following dependency to the _dependencies_ section of your build descriptor:

* Maven (in your `pom.xml`):

[source,xml,subs="+attributes"] ---- ${maven.groupId} ${maven.artifactId} ${maven.version} ----

* Gradle (in your `build.gradle` file):

[source,groovy,subs="+attributes"] ---- compile '${maven.groupId}:${maven.artifactId}:${maven.version}' ----

Be aware that you can have only a single implementation of the SPI in your _classpath_. If none, the default backend is used.

==== Configuration

The backend is based on the http://vertx.io/docs/vertx-consul-client/java[vertx-consul-client]. The configuration is the client configuration.

Here is an example:

[source,$lang] ---- examples.Examples#configuration1(io.vertx.core.Vertx) ----

Skip navigation links

Copyright © 2018 Eclipse. All rights reserved.