Java read stream from .pubsub.sub

Hey, I’m trying to read using the java api the stream from a ipfs.pubsub.sub(topic). Is there any documentation that might help?
I found this so far but even with this I get an error ForkJoinPool is not a functional interface

public void pubsub() throws Exception {
    ConcurrentLinkedQueue<Object> res = new ConcurrentLinkedQueue<>();
    new Thread(() -> {
        try {
            ipfs.pubsub.sub("demo", res::add); //ForkJoinPool is not a functional interface
        } catch (IOException e) {
            throw new RuntimeException(e);}

    while (true) {
        if (res.size() > 0) {
            Map msg = (Map) res.poll();
            if (msg.size() > 0) {
                String from = msg.get("from").toString();
                String topicId = msg.get("topicIDs").toString();
                String seqno = msg.get("seqno").toString();
                String data = new String(Base64.getDecoder().decode(msg.get("data").toString()));
                System.out.println(from + topicId + seqno + data);

try this instead:

ipfs.pubsub.sub("demo", res::add, t -> t.printStackTrace());

also, you can retrieve the the base58 from id and the numerical (long) seqno this way:

String ps_from = Base58.encode(Base64.getDecoder().decode(msg.get("from").toString()));
Long ps_seqno = ByteBuffer.wrap(Base64.getDecoder().decode(msg.get("seqno").toString())).getLong();