question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

execution stop and occur MissingBackpressureException.

See original GitHub issue

stop executing and occur exception in 500~10000 events.

rxjava-1.0.4 rxandroid-0.24.0 using.

Code :

    Observable.interval(1000, TimeUnit.SECONDS)
        .map(count -> {
            return Context.getTime();
        })
        .retry()
        .subscribe(time -> {
            System.out.println(time);
            timeTextView.setText(time);
        });

Error Message :

...
2015-01-14 13:30:01
2015-01-14 13:30:02
2015-01-14 13:30:03
2015-01-14 13:30:04
2015-01-14 13:30:05
rx.exceptions.MissingBackpressureException
        at rx.internal.util.RxRingBuffer.onNext(RxRingBuffer.java:338)
        at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.onNext(OperatorObserveOn.java:115)
        at rx.internal.operators.OperatorSubscribeOn$1$1$1.onNext(OperatorSubscribeOn.java:76)
        at rx.internal.operators.OnSubscribeRedo$2$1.onNext(OnSubscribeRedo.java:231)
        at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
        at rx.internal.operators.OnSubscribeTimerPeriodically$1.call(OnSubscribeTimerPeriodically.java:51)
        at rx.Scheduler$Worker$1.call(Scheduler.java:120)
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:47)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:841)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
akarnokdcommented, Jan 14, 2015

There must be something in your code you are not showing that makes this issue. This works for me:

public class IntervalRetry {
    public static void main(String[] args) throws Exception {
        Observable.interval(1, TimeUnit.MICROSECONDS)
        .map(count -> {
            return System.currentTimeMillis();
        })
        .onBackpressureDrop()
        .retry()
        .observeOn(Schedulers.computation())
        .subscribe(time -> {
            System.out.println(time);
        }, Throwable::printStackTrace, System.out::println);
        Thread.sleep(10000);
    }
}
0reactions
IlyaEremincommented, Jan 12, 2017

@akarnokd gotcha, thanks for quick answer. I thought it’s necessary to use it with onBackpressureDrop().

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Avoiding MissingBackpressureException exceptions
In ReactiveX (RXJava), it would appear they have taken a different stance by throwing exceptions when backpressure starts to build.
Read more >
movesense / Movesense-mobile-lib / issues / #75 - [ANDROID ...
It happens when I request 10000 samples to be sent and parse them on the fly. Around 400+ samples through I get the...
Read more >
Dealing with Backpressure with RxJava - Baeldung
Running that program will fail with a MissingBackpressureException because we didn't define a way of handling overproducing Observable. Examples ...
Read more >
Advanced RxJava programming with stream nesting - Medium
We will start by analyzing a hypothetical backpressure issue and solving it with the stream nesting technique. Having the required knowledge foundation, ...
Read more >
Pentaho - Hitachi Vantara community
Thread Subject Replies Last Post Is it still possible to build pentaho kettle 7.1 0 11‑04‑2022 by Marc Wentink Can't copy campus to clipboard. 0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found