In this post, we will see how to resolve execute 2 Mono sequentialy not supporte blocking
Question:i have the two bellow functions
messageEventis executed successfully i executethe
getPersonByIdfunction, and the return of the
getPersonByIdfunction is saved in the database
i tried like below
2023-03-09 21:56:20.191 ERROR 21080 — [nister-group]-0] c.s.e.v.s.q.i : Exception in on() with cause = ‘NULL’ and exception = ‘block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-nio-2’ java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-nio-2 at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:83
Best Answer:You need this operator from
block()in a Reactor Http thread.
If you have better answer, please add a comment about this, thank you!