...
/Finding Blocking Code With Blockhound
Finding Blocking Code With Blockhound
Learn about Blockhound and how to implement it in our application.
We'll cover the following...
All reactive programming we’ve learned so far becomes useless if someone inserts a blocking API call.
So how do we know that every line of code is configured correctly? We can use BlockHound.
Blockhound
BlockHound is a Java agent initially built by Java Champion Sergei Egorov, who was once part of the Reactor team that hunts down and alerts us to every blocking method call found in our code and third-party libraries. It finds blocking method calls inside the JDK itself.
BlockHound is added to our application by adding the following dependencies to our
pom.xml
file:
<dependency><groupId>io.projectreactor.tools</groupId><artifactId>blockhound</artifactId><version>1.0.3.RELEASE</version></dependency>
Adding BlockHound to the build.
BlockHound does nothing by itself. Register it with an ...