RxJS for Spring Developers: The Customer Left, the Card Was Charged
The design sheet The full architecture and the verified references. Free, no email.
3:40 docker compose up, and watch it happen
A customer closes the tab half a second into a two second charge. On Spring WebFlux, the cancellation reached the publisher and nothing was charged. On our NestJS on Express route, the returned Observable kept running and the card was charged. Measured on 1 October 2026. RxJS and Reactor share operators, not runtime contracts.
Three differences behind the same names
- The returned value. WebFlux encoded
Flux.just(1, 2, 3)as[1,2,3]. A Nest controller returningof(1, 2, 3)answered3: Nest waits for completion and sends the last value. - Concurrency. A thousand 200 ms tasks with no concurrency argument: Reactor’s
flatMapran about 256 at once, RxJSmergeMapall 1000. WithmergeMap(work, 256), the peak was 256. - Cancellation. WebFlux cancelled on disconnect. Our Nest route needed the response close wired in
with
takeUntil; then nothing was charged. Keep the charge idempotent anyway.
The full code for every measurement is in the repository, and the free design sheet above has the checklist on one page.