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

Add ListAddListener to RBlockingQueue in Redisson

$
0
0

I am attempting to use ListAddListener to implement a reliable queue in Redisson. My problem is that I am unable to ender the onMessage method for the listener.

I am able to use subscribeOnElements to poll from the queue but I am unable to add the polled data to a backup queue for reliability.

I have tried adding a listener for the queue

queue = client.getBlockingQueue("TESTQUEUE");        queue.addListener((ListInsertListener) name -> System.out.println("Hey :)"));        queue.add("Test");

and I have tried adding to a secondary queue within the subscribeOnElements method

queue.subscribeOnElements((msg) -> {            backup.add(msg);            BackgroundInformation info = (BackgroundInformation) msg;            processTest(info);        });

Both of these produce no output.

Thank you.


Viewing all articles
Browse latest Browse all 2203

Trending Articles