Skip to content

Threading model for HTTP Client and Java 21+ #11054

Answered by yawkat
Nahuel92 asked this question in Q&A
Discussion options

You must be logged in to vote

I think you are misunderstanding what "blocking the event loop" means. It does not matter how you do the blocking, whether the client is annotated with ExecuteOn (which I believe does nothing anyway), or even whether you block in some completely different way that does not involve BlockingHttpClient. What matters is that the controller must not block at all when it runs on the event loop. So if you use blocking operations like BlockingHttpClient, you must make sure that the controller is annotated with ExecuteOn (or the equivalent config property). Then what you do in the controller doesn't matter.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Nahuel92
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #10933 on August 06, 2024 14:11.