=== Redis Configuration Store

The Redis Configuration Store extends the Vert.x Configuration Retriever and provides the
way to retrieve configuration from a Redis server.

==== Using the Redis Configuration Store

To use the Redis Configuration Store, add the following dependency to the
_dependencies_ section of your build descriptor:

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

[source,xml,subs="+attributes"]
----
<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-config-redis</artifactId>
  <version>3.4.2</version>
</dependency>
<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-config</artifactId>
  <version>3.4.2</version>
</dependency>
----

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

[source,groovy,subs="+attributes"]
----
compile 'io.vertx:vertx-config:3.4.2'
compile 'io.vertx:vertx-config-redis:3.4.2'
----

==== Configuring the store

Once added to your classpath or dependencies, you need to configure the
`link:../../jsdoc/module-vertx-config-js_config_retriever-ConfigRetriever.html[ConfigRetriever]` to use this store:

[source, js]
----
var ConfigRetriever = require("vertx-config-js/config_retriever");
var store = {
  "type" : "redis",
  "config" : {
    "host" : "localhost",
    "port" : 6379,
    "key" : "my-configuration"
  }
};

var retriever = ConfigRetriever.create(vertx, {
  "stores" : [
    store
  ]
});

----

The store configuration is used to create an instance of
`link:../../jsdoc/module-vertx-redis-js_redis_client-RedisClient.html[RedisClient]`. check the documentation of the Vert.x Redis Client
for further details.

In addition, you can set the `key` instructing the store in which _field_ the configuration
is stored. `configuration` is used by default.

The created Redis client retrieves the configuration using the `HGETALL` configuration.