Home » Java » java – Spring WebFlux Hooks-Exceptionshub

java – Spring WebFlux Hooks-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment


Please tell me, I don’t quite understand.

The Reactor library provides a Hooks class that lets us configure the behavior of Flux and Mono operators.

After the debug mode gets activated, our exception logs will include some helpful information: the assembly trace of the publisher + the operators that observed the error after it was first triggered, with the user class where they were chained.

There are 3 types of Hooks: Dropping Hooks, Internal Error Hooks and Assembly Hooks, which return some behavior in different situations,

for example,
Assembly Hooks: if after onComplete() I call the onNext() method, then in this case Hooks.onNextDropped( )

But then, what does the hooks class have to do with debug mode?

For example, if I specify Hooks.onOperatorDebug() in the method.

I don’t quite understand what the Hooks class is for.
I read the documentation but could not figure it out.
I would really appreciate help or an explanation.

How to&Answers: