Skip to content

refactor(java): unify blocking TCP client as wrapper over async client#2947

Merged
mmodzelewski merged 4 commits intomasterfrom
java-clients-unification
Mar 17, 2026
Merged

refactor(java): unify blocking TCP client as wrapper over async client#2947
mmodzelewski merged 4 commits intomasterfrom
java-clients-unification

Conversation

@mmodzelewski
Copy link
Member

The blocking TCP client had its own independent protocol
implementation via InternalTcpClient using Reactor Netty.
This duplicated all serialization, request/response handling,
and connection logic already present in the async client.

Replace InternalTcpClient with thin delegation to
AsyncIggyTcpClient, resolving CompletableFutures via
FutureUtil.resolve(). This eliminates ~900 lines of
duplicated protocol code and the Reactor dependency,
replacing it with direct Netty modules.

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 89.89899% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.44%. Comparing base (25dcd76) to head (d40cfad).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...rg/apache/iggy/client/blocking/tcp/FutureUtil.java 40.00% 5 Missing and 1 partial ⚠️
...iggy/client/blocking/tcp/IggyTcpClientBuilder.java 85.71% 2 Missing ⚠️
...apache/iggy/client/blocking/tcp/IggyTcpClient.java 93.33% 1 Missing ⚠️
...ache/iggy/client/blocking/tcp/SystemTcpClient.java 85.71% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2947      +/-   ##
============================================
+ Coverage     70.25%   70.44%   +0.19%     
+ Complexity      925      909      -16     
============================================
  Files          1033     1029       -4     
  Lines         85665    84844     -821     
  Branches      63040    62427     -613     
============================================
- Hits          60182    59772     -410     
+ Misses        22982    22582     -400     
+ Partials       2501     2490      -11     
Flag Coverage Δ
java 61.57% <89.89%> (-0.79%) ⬇️

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

Files with missing lines Coverage Δ
...gy/client/async/tcp/AsyncIggyTcpClientBuilder.java 77.27% <100.00%> (ø)
...y/client/blocking/tcp/ConsumerGroupsTcpClient.java 100.00% <100.00%> (ø)
.../client/blocking/tcp/ConsumerOffsetsTcpClient.java 100.00% <100.00%> (ø)
...he/iggy/client/blocking/tcp/MessagesTcpClient.java 100.00% <100.00%> (+3.33%) ⬆️
.../iggy/client/blocking/tcp/PartitionsTcpClient.java 100.00% <100.00%> (ø)
...nt/blocking/tcp/PersonalAccessTokensTcpClient.java 100.00% <100.00%> (ø)
...che/iggy/client/blocking/tcp/StreamsTcpClient.java 100.00% <100.00%> (ø)
...ache/iggy/client/blocking/tcp/TopicsTcpClient.java 100.00% <100.00%> (ø)
...pache/iggy/client/blocking/tcp/UsersTcpClient.java 100.00% <100.00%> (+7.93%) ⬆️
...apache/iggy/client/blocking/tcp/IggyTcpClient.java 57.44% <93.33%> (-2.56%) ⬇️
... and 3 more

... and 44 files with indirect coverage changes

🚀 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.

The blocking TCP client had its own independent protocol
implementation via InternalTcpClient using Reactor Netty.
This duplicated all serialization, request/response handling,
and connection logic already present in the async client.

Replace InternalTcpClient with thin delegation to
AsyncIggyTcpClient, resolving CompletableFutures via
FutureUtil.resolve(). This eliminates ~900 lines of
duplicated protocol code and the Reactor dependency,
replacing it with direct Netty modules.
@mmodzelewski mmodzelewski force-pushed the java-clients-unification branch from d43791f to ba29f6d Compare March 16, 2026 19:11
@mmodzelewski mmodzelewski merged commit 6812907 into master Mar 17, 2026
42 checks passed
@mmodzelewski mmodzelewski deleted the java-clients-unification branch March 17, 2026 07:18
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.

4 participants