clickStream.withLatestFrom(dataStream, (left, right) -> right).subscribe(parseData)
public static final Observable. Objects from other classes can subscribe to the static Observable. Is this an antipattern? It doesn't smell right to me, but I wanted a second opinion. Normally I'm very wary about memory leaks in these kinds of scenarios, and implications for unit testing.
onNextmethod, the Observable's
doOnTerminatecallbacks never fire
RuntimeExceptionmay be thrown (
NullPointerException, etc.). The behavior I'm seeing is that if a
RuntimeExceptionis thrown in the subscriber
onErrorcallback is firing, but the
doOnTerminateactions are not.
.map(mapped -> combine(data, mapped))etc.
mapand use a empty
.subscribe()after the flatmap. Might be appropriate to use
doOnEach. Perhaps only part of your logic needs to be there. Not my favorite solution but at least it's readable.