Skip to content

feat(java): add async API parity with blocking client#2718

Open
atharvalade wants to merge 3 commits intoapache:masterfrom
atharvalade:issue-2716-java-async-api-parity
Open

feat(java): add async API parity with blocking client#2718
atharvalade wants to merge 3 commits intoapache:masterfrom
atharvalade:issue-2716-java-async-api-parity

Conversation

@atharvalade
Copy link
Contributor

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

  • Passed
  • Yes

AI Usage

  1. Which tools? Claude Sonnet 4.5
  2. Scope of usage? Code scaffolding and implementation assistance, AI helped generate the async client interfaces and TCP implementations following existing codebase patterns
  3. How verified? Compiled successfully with Gradle build, reviewed all generated code against blocking client implementations to ensure correct serialization/deserialization logic, command codes, and error handling
  4. Can explain every line? Yes, all code follows established patterns from existing async clients (UsersTcpClient, ConsumerGroupsTcpClient). Each implementation uses BytesSerializer for request payloads, CommandCode enums for operations, and BytesDeserializer for responses with proper resource cleanup in finally blocks.

@atharvalade atharvalade changed the title feat(java-sdk): add async API parity with blocking client (#2716) feat(java): add async API parity with blocking client (#2716) Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 91.48936% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.59%. Comparing base (aff29a5) to head (1289d2e).

Files with missing lines Patch % Lines
.../apache/iggy/client/async/tcp/SystemTcpClient.java 86.48% 5 Missing ⚠️
...apache/iggy/client/async/ConsumerGroupsClient.java 0.00% 4 Missing ⚠️
...pache/iggy/client/async/ConsumerOffsetsClient.java 0.00% 3 Missing ⚠️
...org/apache/iggy/client/async/PartitionsClient.java 0.00% 2 Missing ⚠️
...ggy/client/async/tcp/ConsumerOffsetsTcpClient.java 92.59% 1 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
java 54.02% <91.48%> (+1.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ache/iggy/client/async/tcp/AsyncIggyTcpClient.java 98.38% <100.00%> (+0.56%) ⬆️
...iggy/client/async/tcp/ConsumerGroupsTcpClient.java 68.11% <100.00%> (+52.73%) ⬆️
...che/iggy/client/async/tcp/PartitionsTcpClient.java 100.00% <100.00%> (ø)
...lient/async/tcp/PersonalAccessTokensTcpClient.java 100.00% <100.00%> (ø)
...org/apache/iggy/client/async/PartitionsClient.java 0.00% <0.00%> (ø)
...ggy/client/async/tcp/ConsumerOffsetsTcpClient.java 92.59% <92.59%> (ø)
...pache/iggy/client/async/ConsumerOffsetsClient.java 0.00% <0.00%> (ø)
...apache/iggy/client/async/ConsumerGroupsClient.java 0.00% <0.00%> (ø)
.../apache/iggy/client/async/tcp/SystemTcpClient.java 86.48% <86.48%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mmodzelewski
Copy link
Member

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.

@hubcio hubcio changed the title feat(java): add async API parity with blocking client (#2716) feat(java): add async API parity with blocking client Feb 16, 2026
@atharvalade atharvalade force-pushed the issue-2716-java-async-api-parity branch from 94bc301 to 979b2d8 Compare February 17, 2026 18:25
@atharvalade
Copy link
Contributor Author

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.

Hi @mmodzelewski, thanks for catching that! I've rebased the branch onto the latest upstream master and removed the stray C# commit.

@ex172000
Copy link
Contributor

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

@atharvalade atharvalade force-pushed the issue-2716-java-async-api-parity branch from 979b2d8 to 1289d2e Compare February 20, 2026 20:27
@atharvalade
Copy link
Contributor Author

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

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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before storing an offset you need to send some message to a stream, see the latest updates to the blocking client tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes you're right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Java SDK] Async client missing API parity with blocking client

3 participants