[ 
https://issues.apache.org/jira/browse/CAMEL-24327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-24327.
---------------------------------
    Resolution: Fixed

> camel-mcp-server - session TTL / keep-alive eviction for the Vert.x 
> streamable transport
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24327
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24327
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-ai
>            Reporter: Federico Mariani
>            Assignee: Omar Atie
>            Priority: Major
>
> Follow-up from the CAMEL-24310 review ([PR 
> #25306|https://github.com/apache/camel/pull/25306]).
> The {{sessions}} map in {{VertxMcpStreamableServerTransportProvider}} grows 
> on every {{initialize}} and entries are removed only on explicit DELETE, on a 
> failed SSE write to the client, or on {{closeGracefully()}}. A client that 
> disconnects without sending DELETE and is never written to again leaks its 
> session entry.
> Add active eviction:
> * keep-alive pings (the MCP Java SDK ships {{KeepAliveScheduler}} for exactly 
> this — the servlet reference transport wires it behind a 
> {{keepAliveInterval}} builder option), evicting sessions whose ping fails, 
> and/or
> * a configurable idle TTL for sessions with no activity.
> Expose the interval/TTL as engine configuration with a sensible default. The 
> same concern applies to any future engine that manages its own session map 
> (the Quarkus and Spring Boot native engines own sessions in their runtimes).
> ----
> _This issue was drafted by Claude Code on behalf of Federico Mariani._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to