### Consul backend

<p> The service discovery has a plug-able backend using the `ServiceDiscoveryBackend` SPI. This is an implementation of the SPI based on Consul. <p> ==== Using the Consul backend <p> To use the Consul backend, add the following dependency to the dependencies section of your build descriptor: <p> * Maven (in your `pom.xml`): <p>

    <dependency>
    <groupId>io.vertx</groupId>
    <artifactId>vertx-service-discovery-backend-consul</artifactId>
    <version>3.8.3</version>
    </dependency>

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

    compile 'io.vertx:vertx-service-discovery-backend-consul:3.8.3'

<p> Be aware that you can have only a single implementation of the SPI in your classpath. If none, the default backend is used. <p> ==== Configuration <p> The backend is based on the vertx-consul-client. The configuration is the client configuration. <p> Here is an example: <p>

    require 'vertx-service-discovery/service_discovery'
    VertxServiceDiscovery::ServiceDiscovery.create(vertx, {
      'backendConfiguration' => {
        'defaultHost' => "127.0.0.1",
        'dc' => "my-dc"
      }
    })