rbento / java-reactor-starter

A starter project to exercise Reactive Programming with Java.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java-reactor-starter

Build

A starter project to practice Reactive Programming with Java and Project Reactor.

Requirements


Build


./gradlew clean build

Run


./gradlew run

Running with BlockHound


BlockHound is a Java agent that detects blocking calls from non-blocking threads.

At the entry point
    public static void main(String[] args) {
        BlockHound.install();
        // ...
    }
Set the VM options for BlockHound
    -XX:+AllowRedefinitionToAddDeleteMethods
    -XX:+EnableDynamicAgentLoading
Result when a blocking call is present:
    reactor.blockhound.BlockingOperationError: Blocking call! java.lang.Thread.sleep
	    at java.base/java.lang.Thread.sleep(Native Method)
	    at com.example.Example.lambda$exampleTest$0(Example.java:16)

About

A starter project to exercise Reactive Programming with Java.

License:MIT License


Languages

Language:Java 100.0%