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.