Debugging Reactor streams

Debugging Rector streams is not straightforward. This is due to the fact that all stream processing in Reactor is asynchronous and non-blocking. In a synchronous and blocking system, an error stacktrace points to the root cause of the issue. However, in an asynchronous reactor stream, the error is logged in the Subscriber but has been raised in an operator in stream processing. The error stacktrace does not mention the operator. Let's take a look at the following Reactor stacktrace:

reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.IllegalStateExceptionCaused by: java.lang.IllegalStateException    at ReactorDebug.lambda$testPublisherStub$1( at reactor.core.publisher.FluxGenerate$GenerateSubscription.fastPath( ...

Get Hands-On Reactive Programming with Reactor now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.