Debug hook

Reactor provides assembly-time instrumentation capability to debug a stacktrace. This capability enables us to intercept all invocations of Flux/Mono operations. Each interception then keeps a record of the error thrown with the operation invoked. The resultant mapping is then appended to the stacktrace. This record can then be used to find the root cause of the issue. Since this is an additional interception, which keeps a record mapping, it should only be invoked to debug errors and must not be enabled in production systems.  Reactor provides a Hooks.OnOperatorDebug API, which must be invoked before instantiating the Flux/Mono. Let's invoke Hooks.OnOperatorDebug in our test case, as follows:

      @Test public void testPublisherStub() ...

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.