Welcome to my Reactive Programming learning repository! π
This repository is dedicated to exploring and mastering the concepts of Reactive Programming within the Spring Boot ecosystem. It serves as a practical playground to understand non-blocking, asynchronous application development using Project Reactor.
This is a Maven-based Spring Boot project focused on Spring WebFlux. It demonstrates fundamental reactive types and how to handle data streams reactively.
- Project Reactor: The core library used for building reactive applications.
- Mono: Represents a reactive sequence of 0 or 1 item.
- Flux: (Upcoming/Explored) Represents a reactive sequence of 0 to N items.
- Subscribers: Understanding the
CoreSubscriberinterface, including handlingonSubscribe,onNext,onError, andonCompletelifecycle events. - Non-blocking I/O: The fundamental shift from traditional thread-per-request blocking models to asynchronous event-loop models.
- Java: Java 17
- Spring Boot: Version 3.5.6
- Spring WebFlux: For building reactive web applications (
spring-boot-starter-webflux). - Project Reactor: Core reactive library (
reactor-testfor testing reactive streams). - Lombok: To reduce boilerplate code.
Reactive Programming Learning/src/main/java/springboot/lear/reactiveProgramming/: Contains the main Spring Boot application.Reactive Programming Learning/src/test/java/springboot/lear/reactiveProgramming/: Contains JUnit tests that demonstrate the behavior of reactive streams (e.g., creating aMonoand attaching a customCoreSubscriber).
- Clone the repository:
git clone https://github.com/shrihari7396/reactive-Programming.git
- Navigate to the project directory:
cd "reactive-Programming/Reactive Programming Learning"
- Run the application:
mvn spring-boot:run
- Run the Tests: The best way to see reactive programming in action in this repository is to run the test cases provided in
ReactiveProgrammingLearningApplicationTests.java.Watch the console output to see how themvn testMonoemits data and how the subscriber reacts!
Embracing the reactive paradigm for highly scalable and resilient systems! π