feat(java): add async API parity with blocking client#2718
feat(java): add async API parity with blocking client#2718atharvalade wants to merge 3 commits intoapache:masterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2718 +/- ##
============================================
+ Coverage 68.52% 68.59% +0.06%
- Complexity 656 708 +52
============================================
Files 743 750 +7
Lines 62808 62996 +188
Branches 59221 59224 +3
============================================
+ Hits 43039 43211 +172
- Misses 17656 17671 +15
- Partials 2113 2114 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/ConsumerOffsetsClient.java
Show resolved
Hide resolved
|
Hi @atharvalade, thanks for the PR. It looks like some C# changes have accidentally slipped into this PR. Would you mind tidying up the diff so it only shows the Java updates? Once that's sorted, I'll start the review. |
94bc301 to
979b2d8
Compare
Hi @mmodzelewski, thanks for catching that! I've rebased the branch onto the latest upstream master and removed the stray C# commit. |
|
It's probably a better idea we add some UT to the change, or even better if ingestion test can be added too. Otherwise our coverage is likely adversely impacted |
979b2d8 to
1289d2e
Compare
added some UTs, please check now. @ex172000 @mmodzelewski |
| var consumer = new Consumer(Consumer.Kind.Consumer, ConsumerId.of(5000L)); | ||
| var offset = BigInteger.valueOf(42); | ||
|
|
||
| client.consumerOffsets() |
There was a problem hiding this comment.
before storing an offset you need to send some message to a stream, see the latest updates to the blocking client tests
There was a problem hiding this comment.
oh yes you're right
Which issue does this PR close?
Closes #2716
Rationale
The async TCP client was missing 17 methods that existed in the blocking client, limiting its usability for async workflows.
What changed?
The async TCP client only exposed 5 of 9 sub-client interfaces (Messages, ConsumerGroups, Streams, Topics, Users), and ConsumerGroupsClient had only 2 of 6 methods. This left 17 methods unavailable for async operations.
Added 4 new async client interfaces (SystemClient, PersonalAccessTokensClient, PartitionsClient, ConsumerOffsetsClient) with full TCP implementations, and extended ConsumerGroupsClient with 4 missing methods (get, getAll, create, delete). All async methods follow the existing pattern using CompletableFuture and match the blocking client API exactly.
Local Execution
AI Usage