First time using a Multi and I am doing something wrong. I want to use a SubmissionPublisher from java.util.concurrent. It implements the Flow.Publisher interface.
final SubmissionPublisher<String> subPub1 = new SubmissionPublisher<>();
final var m1 = Multi.createFrom().publisher(subPub1);
Multi.createFrom.publishers's signature says the argument needs to implement Flow.Publisher. However, I get a type error.
The method publisher(Publisher<T>) in the type MultiCreate is not applicable for the arguments (SubmissionPublisher<String>)
I've tried casting it two different ways:
final var m1 = Multi.createFrom().publisher((java.util.concurrent.Flow.Publisher<String>) subPub1);
and
final var m1 = Multi.createFrom().publisher((Publisher<String>) subPub1);
but I still get the error:
The method publisher(Publisher<T>) in the type MultiCreate is not applicable for the arguments (Flow.Publisher<String>)
Any insghts into what I am doing wrong?