Conversation
added 4 commits
February 11, 2026 10:07
Implements a new class for improved bidirectional event streaming. Introduces exponential backoff with jitter for reconnection attempts, addressing connection stability issues. Enhances logging for better monitoring and diagnostics. Introduces interface improvements to streamline event processing across multiple streams. Extends existing job queue functionality to incorporate similar reconnection and backoff logic, enhancing its robustness. Relates to stream-testing-updates branch.
Reorganizes GateClient classes by extracting shared logic into an abstract class, enabling more structured and reusable stream lifecycle management. Introduces additional monitoring and error handling, especially for gRPC connections, including exponential backoff and connection health checks. Updates gRPC library versions to ensure compatibility and bug fixes. Relates to stream-testing-updates
Upgrades source and target compatibility to Java 21 in build files for improved performance and access to the latest language features. Adds @ExecuteOn(TaskExecutors.BLOCKING) annotation in AgentsController to specify execution context, promoting performance efficiency for I/O-bound operations. Enhances code readability by adjusting comment formatting. Relates to stream-testing-updates
Introduces a check for routine stream closures using a new method 'isRoutineStreamClosure'. Logs routine server-initiated closures as debug instead of error, reducing noise in logs. Improves error handling by distinguishing between expected and unexpected stream closures. Relates to stream stability improvements.
added 2 commits
February 18, 2026 12:33
Upgrades JDK setup in GitHub workflows from version 17 to 21 to leverage new features and improvements. Removes obsolete simulated network disconnect functionality from GateClientAbstract, simplifying the codebase and reducing the potential for errors during testing. Streamlines code as part of ongoing stream-testing updates.
Switches to using a virtual thread per task executor for improved concurrency management and performance. This change enables more efficient handling of concurrent tasks by leveraging lightweight virtual threads. Relates to stream-testing-updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the
GateClientAbstractclass, establishing a robust, reusable framework for managing bidirectional gRPC stream clients. The main changes include implementing a template method pattern for stream lifecycle management, adding connection tracking and exponential backoff with jitter, supporting simulated network disconnects, and providing shared helpers for hung connection detection and monitoring. TheGateClientJobQueueclass is refactored to leverage these new shared mechanisms, removing redundant logic.Core stream lifecycle and connection management enhancements:
Refactored
GateClientAbstractto implement a template method pattern for stream lifecycle management, including new overridable methods (runStream,getStreamName,onStreamDisconnected) and a unifiedstartmethod that handles backoff, error tracking, and connection state. Added connection tracking fields (e.g.,lastMessageTime,consecutiveFailures, etc.) and shared helpers for hung connection detection and status reporting. [1] [2] [3] [4] [5] [6] [7]Added exponential backoff with jitter for reconnection attempts and logic to reset gRPC's internal connect backoff timer, improving resilience to transient failures. [1] [2]
Introduced simulated network disconnect functionality, allowing forced disconnects and blocking reconnections for testing or operational purposes. [1] [2]
Refactoring and code cleanup:
GateClientJobQueueto remove redundant connection tracking and lifecycle logic, now inherited from the improvedGateClientAbstract.Build and legal updates: