-
Notifications
You must be signed in to change notification settings - Fork 261
docs(java): add async client JavaDoc and usage guide (#2231) #2711
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
base: master
Are you sure you want to change the base?
docs(java): add async client JavaDoc and usage guide (#2231) #2711
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## master #2711 +/- ##
=============================================
- Coverage 69.03% 47.10% -21.93%
- Complexity 0 637 +637
=============================================
Files 571 167 -404
Lines 55525 4201 -51324
Branches 55525 285 -55240
=============================================
- Hits 38332 1979 -36353
+ Misses 15318 2137 -13181
+ Partials 1875 85 -1790
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
7697f6b to
e39f575
Compare
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.
tbh i'm not fan of this document. why not incorporate these into examples/java? we want the docs to be as close to code as possible.
i.e. have separate examples for blocking / nonblocking java client, etc.
what do you think?
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.
hmm, that's a good point. tbh, I am actually not sure why I didn't think of this in the first place. Plan is to drop the standalone markdown doc and move the examples into an actual examples/ module with compilable Java apps (async producer, async consumer, blocking equivalents). The JavaDoc on the interfaces stays as-is since that's where it belongs.
Will push an updated version shortly.
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 pushed the new version, let me know if that's better!
|
Examples for Java already exist in |
Which issue does this PR close?
Closes #2231
Rationale
The async client had minimal documentation — interfaces lacked JavaDoc, there was no usage guide, and developers had no reference for CompletableFuture patterns, error handling, or migration from the blocking client.
What changed?
The async client interfaces (
StreamsClient,MessagesClient,TopicsClient,UsersClient,ConsumerGroupsClient) andAsyncIggyTcpClienthad sparse or missing JavaDoc. Developers had to read the source to understand method contracts, parameter semantics, and exception behavior.Added comprehensive JavaDoc to all public async APIs with
@param,@return,@throws, and@seecross-references. CreatedASYNC_CLIENT.mdcovering getting started, connection management, error handling, CompletableFuture chaining patterns, three example applications (high-throughput producer, backpressure consumer, error recovery), performance characteristics (async vs blocking, thread pool sizing), and a step-by-step migration guide. Addedpackage-info.javafor both async packages.Local Execution
compileJava,checkstyleMain,spotlessCheck, andjavadocall pass with zero errorsprekis Rust-specific, this PR is Java/docs onlyAI Usage
{@link},@see, and@throwstag against the actual source code, and to verify all code examples in the guide use correct method signatures, return types, and accessor names from the real API.clean+compileJava+checkstyleMain+spotlessCheck+javadoc) all pass. Manually audited every JavaDoc reference against the source (e.g., confirmedCompressionAlgorithm.Noneis an enum constant not a method, confirmed record accessors likestream.id()andpolled.messages()match actual field names, confirmed all 11 exception types in the error handling table exist in the hierarchy).