-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MGDSTRM-9160] Process authentication and admin client construction as blocking #213
Conversation
f9ad0d8
to
40fd775
Compare
@@ -37,6 +37,7 @@ | |||
import java.util.stream.Collectors; | |||
|
|||
@Path("/api/v1") | |||
@Blocking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeEdgar is there a performance impact here that we should test for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm looking into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up backing out this change and adjusting the createAdminClient
method to return a CompletableFuture
where the Kafka client creation occurs in on worker thread. Also the time allowed for processes running on an event loop thread was increased from the default of 2000ms to 4000ms. This seems reasonable for situations where the server is running with constrained CPU.
I was also successful in getting this to run with a native executable (a few other small changes) with very good performance.
abfe654
to
a8f5457
Compare
Avoids running blocking operations (JWKS retrieval and Kafka Client setup) on the Vert.x event loop/IO threads.
Minor adjustments to allow native executable: - Add `@RegisterForReflection` to `OperationsHandler` - Provide default to `kafka.admin.oauth.enabled`
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Avoids complexity of running various subtasks of some operations on a worker thread.