Parkerhiphop opened a new pull request, #23673:
URL: https://github.com/apache/kafka/pull/23673

   `NetworkClient` currently manages network I/O alongside several distinct 
lifecycles:
   - bootstrap DNS resolution
   - the per-node API versions handshake
   - metadata refresh, and client telemetry. 
   Keeping their state and transition rules in one class makes these flows 
harder to maintain and review independently.
   
   This refactor moves each lifecycle's state and decisions into a focused 
internal class while keeping network orchestration in `NetworkClient`.
   
   **No public API or behavior change is intended.**
   
   ## Changes
   
   - `BootstrapResolver` owns bootstrap DNS submission, retry, timeout, and 
shutdown. `NetworkClient` still decides whether bootstrap is needed and passes 
resolution results to `MetadataUpdater`.
   - `ApiVersionNegotiator` owns pending per-node API versions requests, 
unsupported-version fallback, and handshake outcomes. `NetworkClient` still 
checks channel readiness and sends the requests.
   - `DefaultMetadataUpdater` and `NetworkClientTelemetrySender` extract the 
existing inner-class logic for metadata refresh and telemetry request 
scheduling.
   - `NetworkClientTransport` provides the connection and send operations 
needed by the metadata and telemetry classes. `NetworkClient` remains 
responsible for selector polling, connection state, and in-flight requests.
   
   ## Testing
   
   - `./gradlew :clients:test --tests 
org.apache.kafka.clients.NetworkClientTest`
   - `./gradlew :clients:spotlessCheck`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to