= Vert.x Circuit Breaker

Vert.x Circuit Breaker is an implementation of the Circuit Breaker _pattern_ for Vert.x. More details on this pattern on https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern

It keeps track of the
number of failures and _opens the circuit_ when a threshold is reached. Optionally, a fallback is executed.

Supported failures are:

* failures reported by your code
* exception thrown by your code
* uncompleted futures (timeout)

Operations guarded by a circuit breaker are intended to be non-blocking and asynchronous in order to benefit from
the Vert.x execution model.

== Using the Vert.x Circuit Breaker

To use the Vert.x Circuit Breaker, add the following dependency to the _dependencies_ section of your build
descriptor:

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

----
<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-circuit-breaker</artifactId>
  <version>$VERSION</version>
</dependency>
----

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

----
compile 'io.vertx:vertx-circuit-breaker:$VERSION'
----

== Using the circuit breaker

The manual is available from:

* link:src/main/asciidoc/java/index.adoc[in-source java docs]
* link:src/main/asciidoc/groovy/index.adoc[in-source groovy docs]
* link:src/main/asciidoc/js/index.adoc[in-source javascript docs]
* link:src/main/asciidoc/ruby/index.adoc[in-source ruby docs]



