Articles
- gRPC Client in WebFlux and Testing StrategyOct 2026This article adds a gRPC client to movies-info-service, which remains WebFlux. The gRPC stream is wrapped into a Flux, combined with movie data via zipWith, and StatusRuntimeException is mapped to HTTP status codes. Everything is tested against a fake gRPC server via in-process transport, and the tests still pass.
- StreamObserver to Reactor Bridge: Unary, Streaming, Backpressure, and ErrorsOct 2026This article consolidates the StreamObserver to Reactor bridge into a single helper, GrpcReactiveBridge, for unary and server streaming RPCs. The streaming helper follows isReady() as backpressure and disposes the pipeline when the client cancels, then domain errors are mapped to gRPC Status via GrpcExceptionHandler and proven with tests.
- gRPC Server with R2DBC PostgresOct 2026This article adds a gRPC server to movies-review-service from a .proto contract, stores reviews in PostgreSQL via R2DBC, then proves it with tests that call gRPC stubs against Postgres in Testcontainers. Review ids are generated by Postgres, the review list is filtered per movie, and previous tests still pass because WebFlux is kept alongside the gRPC server.
- Functional Endpoints: Routes, Manual Validation, and Streaming with SinksOct 2026This article builds a movies-review-service with RouterFunction and HandlerFunction, runs Bean Validation manually because there are no annotated parameters, then broadcasts new reviews via Sinks and Server-Sent Events. Tests prove an invalid body yields 400, an unknown route yields 404, and two reviews sent after the client connects arrive in order on the SSE stream.
- Validation, Global Error Handler, and Integration Test in WebFluxOct 2026This article adds Bean Validation and a global error handler to movies-info-service, then proves them with WebFluxTest and DataMongoTest on top of embedded MongoDB. An invalid body yields 400 with per-field messages, an unexpected exception yields 500 without leaking details, and the old tests from CRUD Reaktif with`ReactiveMongoRepository`(https://sch39.dev/articles/spring-boot-reactive-mongo-crud) still pass without MongoDB in Docker.
- Reactive CRUD with `ReactiveMongoRepository`Oct 2026This article builds reactive CRUD for MovieInfo on top of ReactiveMongoRepository and a WebFlux annotated controller, then proves it with WebTestClient against a real MongoDB. The tests show that the id is generated by MongoDB, that PUT replaces fields without upserting, and that a missing id yields 404 via switchIfEmpty. Everything runs on Spring Boot 4.1 with the spring.mongodb.* properties.
- Reactor and WebFlux: Mono, Flux, Operators, and the Event LoopOct 2026This article proves through tests that concat, merge, and zip produce different emission orders, that the switchIfEmpty argument is evaluated at assembly time unless wrapped in Mono.defer, and that blocking work must be moved to boundedElastic so it does not hold the Netty event loop thread. Everything runs on Spring Boot 4.1 with StepVerifier and WebTestClient.