code: public static <T> Flux<T> toFlux(EventPublisher<T> eventPublisher) {
          DirectProcessor<T> directProcessor = DirectProcessor.create();
          eventPublisher.onEvent(directProcessor::onNext);
          return directProcessor;
      }
docs: Converts the EventPublisher into a Flux.
  
  @param eventPublisher the event publisher
  @param <T> the type of the event
  @return the Flux