Does Vertx 3.9.0 supports Redis Json or not? Any other ways to achieve it?

453 views Asked by At

I am working with Vertx 3.9.0, I am trying to get json data for a key from redis Server.

redisConnection.send(Request.cmd(Command.GET).arg(key), handler->{
  if(handler.succeeded()) {
    Response response = handler.result();
    System.out.println(response.toString());
    promise.complete();
  }else {
    System.out.println(handler.cause());
  }
});

I always get WRONGTYPE Operation against a key holding the wrong kind of value

I am wondering whether Redis Json Support is provided by vertx-redis-client:3.9.0 ? If not then what are the alternatives to query Json data from Redis.

1

There are 1 answers

0
Alexey Soshin On

Vert.x Redis Client doesn't support Redis modules.

You can see all the supported commands here: https://github.com/vert-x3/vertx-redis-client/blob/master/src/main/java/io/vertx/redis/client/Command.java

Unfortunately, Vert.x Redis Client also doesn't support raw commands.

You can use JRedisJSON for that, but you'll have to write a Vert.x wrapper yourself.