You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
The code uses the reactive WebClient but ends up calling #block() which, as the name suggests, blocks and therefore defeats the whole purpose of using WebClient in the first place. Examples:
The thread is explicit that going Mono / Flux and #subscribe is the way to go if you want to be reactive. #block is a good choice for cases when you want to migrate an existing servlet based application to reactive in a step by step fashion. If you decide to go down that route you still needs solutions for JPA and SOAP which to my knowledge have no reactive options.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The code uses the reactive
WebClient
but ends up calling#block()
which, as the name suggests, blocks and therefore defeats the whole purpose of usingWebClient
in the first place. Examples:CovidCertificate-Api-Gateway-Service/src/main/java/ch/admin/bag/covidcertificate/gateway/service/ValueSetsService.java
Line 51 in 4633b18
CovidCertificate-Api-Gateway-Service/src/main/java/ch/admin/bag/covidcertificate/gateway/service/CovidCertificateRevocationService.java
Line 39 in 4633b18
CovidCertificate-Api-Gateway-Service/src/main/java/ch/admin/bag/covidcertificate/gateway/service/CovidCertificateGenerationService.java
Line 52 in 4633b18
The code should instead do one of the following:
#block()
and instead call#subscribe()
WebClient
to the blockingRestTemplate
Considering all the rest of the code is blocking (
WebServiceTemplate
,JpaRepository
, …)WebClient
seems like the better match.The text was updated successfully, but these errors were encountered: