In welchen Fällen sollte ich doOnNext verwenden, und in welchen Fällen doOnEach?RxJava: Unterschied zwischen doOnNext und doOnEach
.doOnEach(new Action1<Notification<? super MessageProfile>>() {
@Override
public void call(Notification<? super MessageProfile> notification) {
}
})
.doOnNext(new Action1<MessageProfile>() {
@Override
public void call(MessageProfile profile) {
messageProfileDao.save(profile);
}
})
Dies sieht so aus, als hätten beide Operatoren denselben Effekt.