RockteMQ-AI commented on issue #1403:
URL: 
https://github.com/apache/rocketmq-clients/issues/1403#issuecomment-6281695270

   **Fix Spec Generated**
   
   A comprehensive fix specification has been generated for this issue. The 
spec addresses all 6 reported problems with minimal, non-breaking changes.
   
   ## Summary of Changes
   
   ### 1. Session Lifecycle Management
   - Add `is_started()` health check in `get_or_create_session` to evict and 
replace dead sessions
   - Add `cleanup_dead_sessions()` method called every 30s in heartbeat loop
   - Dead sessions are now properly removed from `session_map`
   
   ### 2. Shadow Session Telemetry Fix
   - New `SessionManager::update_all_sessions` operates on map-owned sessions 
(not shadows)
   - Telemetry streams now persist instead of being dropped every 30s
   
   ### 3. HTTP/2 Keepalive Configuration
   - Add `http2_keep_alive_interval(30s)`, `keep_alive_timeout(10s)`, 
`keep_alive_while_idle(true)` to `build_endpoint`
   - Half-open connections will now be detected and closed
   
   ### 4. Session Liveness Check
   - All session retrieval paths now check `is_started()` before returning
   - Dead sessions are evicted and replaced with fresh ones
   
   ### 5. gRPC Deadline Fix
   - Update deadline calculation to `long_polling_timeout + timeout` (matching 
documentation)
   - Fixes 100% failure rate when `long_polling_timeout < 5s`
   
   ### 6. Settings Update Handling
   - `SimpleConsumer` now properly handles server-pushed `Settings` updates
   - Mirrors `Producer::handle_settings_command` behavior
   
   ## Files Modified
   - `rust/src/client.rs` — session lifecycle, cleanup, liveness checks
   - `rust/src/session.rs` — HTTP/2 keepalive, deadline fix, telemetry handling
   - `rust/src/simple_consumer.rs` — Settings update handling
   - `rust/src/conf.rs` — documentation alignment (docs-only)
   
   ## Backward Compatibility
   All changes are `pub(crate)`-internal. No breaking changes to public API.
   
   ## Risk Assessment
   **Medium** — mutex held across bounded awaits is the main concern, but all 
operations are bounded and logged.
   
   ## Next Steps
   
   Please review the spec. Reply with:
   - `/approve` — to proceed with PR generation
   - `/revise <feedback>` — to request changes to the spec
   - `/reject` — to reject this proposal
   
   ---
   *Automated fix proposal by github-manager-bot*
   


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