Skip to content

groupon/vertx-redis

Repository files navigation

vert.x-redis

License: Apache 2 Travis Build Maven Artifact

This is an async library for sending commands to Redis.

Usage

Configuration for Redis Verticle:

{
    "redisConfig": {
        "host": "some-redis-server",
        "port": 6379,
        "eventBusAddress": "address_where_redis_handler_is_registered"
    }
}

Setting up a client and calling a simple get:

    RedisClient redisClient = new RedisClient(eventBus, "addresss_where_redis_handler_is_registered", timeout);
    Future<JsonObject> result = redisClient.get("key");

The JsonObject in the future result will be in a Jsend format. In the case of the get call above it will be similar to:

{
    "status": "success",
    "data": {
        "key": "value"
    }
}

Results in the data block will vary based on the Redis method being called.

Building

Prerequisites:

Building:

vertx-redis> mvn verify

To use the local version you must first install it locally:

vertx-redis> mvn install

You can determine the version of the local build from the pom file. Using the local version is intended only for testing or development.

License

Published under Apache Software License 2.0, see LICENSE

© Groupon Inc., 2014