0

Pardon my silly question. I am very new to project reactor. And this question is bugging me a lot.

If flux can deal with 0....N elements and Mono can deal with 0....1 element, then why there is mono? Isn't flux dealing with 0....1 element also? So what is the requirement for mono? Can we not do the work of mono with just flux?

I tried to find the question on the internet. But could not find it. If you can elaborate a little bit I will be very grateful.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197

1 Answers1

1

The answer to this question is the same as the answer to the question "Why we use a single int if an int array can deal with arbitrary amount of ints".

(That is, it can, but you don't want to.)

Alexey Veleshko
  • 792
  • 1
  • 18