https://github.com/rbento/java-reactor-starter
A starter project to exercise Reactive Programming with Java.
https://github.com/rbento/java-reactor-starter
java reactive-programming reactor-core
Last synced: 10 months ago
JSON representation
A starter project to exercise Reactive Programming with Java.
- Host: GitHub
- URL: https://github.com/rbento/java-reactor-starter
- Owner: rbento
- License: mit
- Created: 2021-10-03T08:19:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-19T05:15:22.000Z (about 2 years ago)
- Last Synced: 2025-02-02T15:34:00.809Z (11 months ago)
- Topics: java, reactive-programming, reactor-core
- Language: Java
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# java-reactor-starter

A starter project to practice [Reactive Programming](https://en.wikipedia.org/wiki/Reactive_programming) with Java and [Project Reactor](https://projectreactor.io).
### Requirements
---
- [JDK 21](https://www.azul.com/downloads/?package=jdk#zulu) from Azul
- [Gradle](https://gradle.org/releases/) 8.4
### Build
---
```bash
./gradlew clean build
```
### Run
---
```bash
./gradlew run
```
### Running with BlockHound
---
[BlockHound](https://github.com/reactor/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)
```