Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2205

How to use Quarkus to read data from Redis Stream?

$
0
0

Am trying to read data from Redis stream using Quarkus. But am unable to achieve it.Upon checking the Quarkus guide,stream is not available yet .Is there any other way that I could read data from Redis Stream using Quarkus

Using Redis API

 @Startup  void onStart(@Observes StartupEvent ev) {    System.out.println("Stream");    Redis.createClient(vertx)        .connect()        .onSuccess(connection -> {          // use the connection          System.out.println("Successfully connected = " + connection +" " + Thread.currentThread().getName());          connection.handler(message -> {            // do whatever you need to do with your message            System.out.println("Message = " + message +" " + Thread.currentThread().getName());          });          connection.send(Request.cmd(Command.XRANGE).arg("test").arg("-").arg("+"))              .onSuccess(res -> {                System.out.println("Subscribed");                System.out.println(res);              });        });  }

Viewing all articles
Browse latest Browse all 2205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>