What Is the Purpose of Schedulers in Project Reactor?
The Schedulers class controls which threads run your reactive pipeline. Learn the built-in schedulers, subscribeOn versus publishOn, and how to wrap blocking code.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
The Schedulers class controls which threads run your reactive pipeline. Learn the built-in schedulers, subscribeOn versus publishOn, and how to wrap blocking code.
The difference between map and flatMap on Mono and Flux in Project Reactor, with examples, ordering and concurrency rules, and the concatMap alternatives.
Mono emits zero or one item and Flux emits zero to many. Learn how they work, how to combine them and how they are used in Spring WebFlux, with working examples.
How to create reactive streams in Java using java.util.concurrent.Flow and Project Reactor, with backpressure, errors and StepVerifier tests.
ReactiveMongoTemplate is Spring Data MongoDB's non-blocking API for custom queries, atomic updates, aggregations and transactions using Mono and Flux.
Add the reactive MongoDB starter, map a @Document entity and extend ReactiveMongoRepository to get non-blocking CRUD and derived queries in Spring WebFlux.
JDBC blocks a thread per query; reactive access with R2DBC does not. Compare models, transactions and tooling, and learn when virtual threads are enough.
A reactive Spring Data repository extends ReactiveCrudRepository and returns Mono and Flux, giving non-blocking database access for Spring WebFlux with MongoDB or R2DBC.
In WebFlux, @RestController works like in MVC but returns Mono and Flux. See a reactive controller, SSE streaming and when to prefer MVC.
Step-by-step guide to a reactive REST API in Spring WebFlux with Mono, Flux, a reactive repository, validation, SSE streaming and tests.
WebFluxConfigurer lets you customize Spring WebFlux defaults such as CORS, codecs, formatters and static resources. See the key methods with working examples.
Learn Project Reactor basics: build Mono and Flux pipelines, combine async calls, handle errors and retries, avoid blocking, and test with StepVerifier.
Write a custom Spring Boot health indicator with Actuator, add details and statuses, and wire it into readiness probes for reliable monitoring.
Spring Boot has no @EnableActuator annotation. Add spring-boot-starter-actuator, choose exposed endpoints, secure them and add custom health checks.
Set up Spring Boot Actuator and Micrometer to expose JVM, HTTP and custom metrics, scrape them with Prometheus and secure the endpoints.
ErrorController lets you replace Spring Boot's default /error handling. See how BasicErrorController works and which lighter options usually fit better.
Return consistent JSON errors from a Spring Boot API with @RestControllerAdvice, @ExceptionHandler, validation errors and the standard ProblemDetail type.
Centralize error handling with @RestControllerAdvice and @ExceptionHandler, and return standard ProblemDetail responses. Includes validation errors and best practices.
When to use @Value and when to use @ConfigurationProperties in Spring Boot, with record-based examples covering validation, relaxed binding and testing.
Configure Spring Boot per environment using application-dev and application-prod files, spring.profiles.active, YAML documents, @Profile beans and profile groups.