[ 
https://issues.apache.org/jira/browse/CAMEL-25448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126825#comment-18126825
 ] 

Claus Ibsen commented on CAMEL-25448:
-------------------------------------

Fixed on main in 
https://github.com/apache/camel/commit/728b01afd74762e70a6ca0af1ccc8537e743890a 
: for an integration of Camel 4.21 or later the monitor sends every request in 
a file of its own ({{executeAction}} and {{fireAction}}), without the lock per 
integration; an older integration keeps the shared {{<pid>-action.json}}. F10 
Stop Routes, which the Diagram tab's topology refresh used to overwrite, now 
runs every time (6 of 6 in a live test, 0 of 2 before).

_Claude Code on behalf of davsclaus_

> camel-jbang - the monitor uses per-request action files, so it cannot lose 
> other clients' answers
> -------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25448
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25448
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> The camel-jbang monitor sends actions through the shared <pid>-action.json / 
> <pid>-output.json pair, and deletes the output file before and after each of 
> its actions (MonitorContext.executeAction). A client asking the same 
> integration at the same moment (a camel command, a script, an agent in the 
> monitor's AI panel) loses its answer or reads the monitor's. Found while 
> measuring CAMEL-25438: the monitor deleted the answer of the measuring script.
> Since 4.21 the connector also takes <pid>-action-<requestId>.json and answers 
> in <pid>-output-<requestId>.json (RuntimeHelper, used by camel ask and the 
> MCP server).
> Proposal: the monitor uses the per-request files.
> * No client can lose another's answer.
> * The connector answers every pending action file in one loop, so the monitor 
> can drop its one-action-at-a-time lock per integration: several tabs' actions 
> are answered together in one loop instead of one loop each (with the faster 
> connector loop, about 0.1 s).
> * Fallback: the monitor attaches to any running integration, and a connector 
> older than 4.21 only knows the shared file: use the Camel version of the 
> status file to pick the protocol.



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

Reply via email to