Caused By: Rx.exceptions.missingbackpressureexception
I have an other problem. This time I am facing this error Caused by: rx.exceptions.MissingBackpressureException during the execution of this code: class UpdateHelper { val numberOf
Solution 1:
The problem is your Observable source emits faster than the consumer consumes. It takes 100 ms to save each product. You can add onBackpressureBuffer().
UpdateHelper().startUpdate()
.onBackpressureBuffer() // Add this.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
Log.d(TAG, "next $it")
}, {
Log.d(TAG, it.message)
}, {
})
Also, you can try removing Thread.sleep(100)
.
flatmap use OperatorMerge ( merge(map(func))
): you can see that in your case, map
's onNexts are sent faster than have been requested.
Post a Comment for "Caused By: Rx.exceptions.missingbackpressureexception"