Skip to content

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

Open
atharvalade wants to merge 1 commit intoapache:masterfrom
atharvalade:issue-2716-java-async-api-parity
Open

feat(java): add async API parity with blocking client#2718
atharvalade wants to merge 1 commit 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 10.63830% with 168 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.14%. Comparing base (2728100) to head (979b2d8).

Files with missing lines Patch % Lines
...iggy/client/async/tcp/ConsumerGroupsTcpClient.java 0.00% 43 Missing ⚠️
...lient/async/tcp/PersonalAccessTokensTcpClient.java 10.52% 34 Missing ⚠️
.../apache/iggy/client/async/tcp/SystemTcpClient.java 10.81% 33 Missing ⚠️
...ggy/client/async/tcp/ConsumerOffsetsTcpClient.java 14.81% 23 Missing ⚠️
...che/iggy/client/async/tcp/PartitionsTcpClient.java 22.22% 14 Missing ⚠️
...ache/iggy/client/async/tcp/AsyncIggyTcpClient.java 25.00% 12 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 ⚠️

❌ Your patch check has failed because the patch coverage (10.63%) 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    #2718      +/-   ##
============================================
- Coverage     68.32%   68.14%   -0.18%     
- Complexity      656      664       +8     
============================================
  Files           741      748       +7     
  Lines         62158    62346     +188     
  Branches      58571    58574       +3     
============================================
+ Hits          42468    42488      +20     
- Misses        17583    17751     +168     
  Partials       2107     2107              
Flag Coverage Δ
java 50.26% <10.63%> (-1.94%) ⬇️

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

Files with missing lines Coverage Δ
...org/apache/iggy/client/async/PartitionsClient.java 0.00% <0.00%> (ø)
...pache/iggy/client/async/ConsumerOffsetsClient.java 0.00% <0.00%> (ø)
...apache/iggy/client/async/ConsumerGroupsClient.java 0.00% <0.00%> (ø)
...ache/iggy/client/async/tcp/AsyncIggyTcpClient.java 79.03% <25.00%> (-18.80%) ⬇️
...che/iggy/client/async/tcp/PartitionsTcpClient.java 22.22% <22.22%> (ø)
...ggy/client/async/tcp/ConsumerOffsetsTcpClient.java 14.81% <14.81%> (ø)
.../apache/iggy/client/async/tcp/SystemTcpClient.java 10.81% <10.81%> (ø)
...lient/async/tcp/PersonalAccessTokensTcpClient.java 10.52% <10.52%> (ø)
...iggy/client/async/tcp/ConsumerGroupsTcpClient.java 5.79% <0.00%> (-9.59%) ⬇️
🚀 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
Adds 17 missing async methods across System, PersonalAccessTokens, Partitions, ConsumerOffsets, and ConsumerGroups clients. Fixes apache#2716
@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

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

Comments