Mono.fromCallable vs Mono.fromSupplier

Viewed 3112

I'm trying to understand the difference between these two methods, but they seem similar to me. Even javadocs are pretty much the same

1 Answers

The difference is between the parameters you use in the methods.

If you use a Callable, it computes a result or throws an exception if unable to do so.
If you use a Supplier you get a result.

There is also another nice post where this topic is discussed.

Related