RxJava: difference between doOnNext and doOnEach

They are indeed quite close.
One thing that differs (and it’s maybe not that clear in the javadoc actually, more visible in sourcecode) is that in doOnEach, you also get Notification wrappers for errors and completion event.

You can then check isOnNext, isOnCompleted or isOnError to check the actual kind of event you got a notification for.

So one Action.call to rule them all, instead of a fully fledged Observer

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)