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.

Unhandled reactor.core.Exception OverflowException: Queue is full?!

See original GitHub issue

While I’m playing around with the new reactive features in Spring Boot v2.0.0.BUILD-SNAPSHOT I have noticed that when I multiple time force close the connection to endpoint like this:

    @GetMapping(produces = MediaType.TEXT_EVENT_STREAM_VALUE, value = "/events")
    public Flux<Event> getEvents()
    {
        return Flux.from(new Publisher<Event>() {
            @Override
            public void subscribe(Subscriber<? super Event> subscriber) {
                while (true) {
                    try {
                        new Thread().sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }

                    subscriber.onNext(new Event(1, new Date()));
                }
            }
        });
    }

Spring throws: “reactor.core.Exceptions$BubblingException: reactor.core.Exceptions$OverflowException: Queue is full?!” and after that when I call the endpoint again it freeze. Here I’ve created a repo https://github.com/georgi-staykov/reactive-demo where you can find example code and video that shows the bug.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rstoyanchevcommented, Apr 17, 2017

There are many problems with this sample. To start it’s not a Reactive Streams compliant Publisher since it calls onNext before calling onSubscribe and then completely ignores back-pressure by pushing items without a corresponding request for items from the Subscriber (i.e. the server). It also blocks the current thread which will quickly kill it (with a few concurrent users) that’s running event-loop style with just a few threads based on the number of cores.

The whole point of using Reactor Flux is that you don’t have to implement Publisher from scratch. Use Flux#create or for this scenario use Flux#interval.

0reactions
snicollcommented, Apr 17, 2017

I don’t know either but it’s not in spring boot and freezing a thread in such environment is just wrong.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Composed Function Support with spring cloud stream throw ...
OnAssembly.1 reactor.core.Exceptions$OverflowException: Queue is full: Reactive Streams source doesn't respect backpressure at reactor.core.
Read more >
Exceptions (reactor-core 3.5.0)
A common error message used when a reactive streams source doesn't seem to respect backpressure signals, resulting in an operator's internal queue to...
Read more >
Handling Exceptions in Project Reactor - Baeldung
In this tutorial, we'll look at several ways to handle exceptions in Project Reactor. · The simplest way to handle an Exception is...
Read more >
Answered: Queue Exceptions: Modify the static… | bartleby
Define a queue overflow exception and modify enqueue so that it throws this exception when the queue runs out of space. Define a...
Read more >
reactor.core.Exceptions$OverflowException.<init> java code ...
public static IllegalStateException failWithOverflow() { return new OverflowException("The receiver is overrun by more signals than expected (bounded queue.
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