atiaomar1978-hub opened a new pull request, #25397: URL: https://github.com/apache/camel/pull/25397
_AI-generated PR on behalf of atiaomar1978-hub via Cursor Cloud Agent._ ## Summary Implements [CAMEL-24327](https://issues.apache.org/jira/browse/CAMEL-24327): active eviction for orphaned MCP streamable HTTP sessions on the Vert.x transport (follow-up from CAMEL-24310 / PR #25306). The session map in `VertxMcpStreamableServerTransportProvider` previously grew on every `initialize` and was cleaned up only on explicit DELETE, failed SSE writes, or shutdown. Clients that disconnected without DELETE could leak session entries indefinitely. ## Changes - **Keep-alive pings** (default 30s): periodic pings on the worker pool; sessions with an open SSE stream are evicted after 3 consecutive ping failures. POST-only sessions without a GET stream are not evicted by keep-alive (idle TTL covers orphans). - **Idle TTL** (default 5 minutes): evict sessions with no POST/GET activity. Set either option to `0` to disable. - **Configuration**: `McpServerConfiguration`, `McpServerInfo`, `camel.server.mcp-session-keep-alive-interval`, `camel.server.mcp-session-idle-ttl` - **Async close** on SSE write failure to avoid blocking the Vert.x event loop - **Docs** + upgrade guide entry for new default eviction behavior ## Tests - `VertxMcpSessionEvictionTest` — idle eviction, POST-only survives keep-alive, active session retention, explicit DELETE - `McpServerSessionEvictionPropertiesTest` — Main property wiring for idle TTL - Existing `VertxMcpServerConformanceTest` still passes All targeted tests pass locally. -- 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]
