Key Factory Method Operators in the Mono Class

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

ความคิดเห็น • 2

  • @SanjeevKumar-hj1fb
    @SanjeevKumar-hj1fb 3 ปีที่แล้ว

    Prof Doug, Can we have more than one subscriber on the same Mono instance? Does that mean multiple subsribeOn() calls on the same mono? Does that mean , on each subscribeOn() call, mono will start emitting ? Any example demonstrating this and practical use case of having multiple subscribers on the same mono?

    • @DouglasSchmidt
      @DouglasSchmidt  3 ปีที่แล้ว

      Please see the countImagesAsync() method in the ImageCounter program at github.com/douglascraigschmidt/LiveLessons/blob/master/Reactive/ImageCounter/src/main/java/ImageCounter.java for an example of multiple subscribers to a single Mono. I'll make a video of this at some point, but in the meantime you can watch the video at th-cam.com/video/V1SQ8XakRng/w-d-xo.html for a walkthrough of an equivalent RxJava implementation that uses Single instead of Mono.