davsclaus commented on code in PR #24116:
URL: https://github.com/apache/camel/pull/24116#discussion_r3440647991


##########
core/camel-util/src/main/java/org/apache/camel/util/SimpleUtils.java:
##########
@@ -27,6 +27,7 @@ public class SimpleUtils {
             Arrays.asList(
                     // Generated by camel build tools - do NOT edit this list!
                     // SIMPLE-FUNCTIONS: START
+                    "a2a",

Review Comment:
   This `"a2a"` prefix entry enables the 16 new Simple functions added in 
`SimpleConstants.java` (`a2a:emit`, `a2a:text`, `a2a:data`, `a2a:file`, 
`a2a:card.*`). While functionally correct, this goes beyond the stated scope of 
the model step. Consider whether these Simple functions warrant their own JIRA 
ticket and PR for a cleaner review.



##########
components/camel-ai/camel-a2a/src/main/java/org/apache/camel/component/a2a/A2AProgress.java:
##########
@@ -137,20 +157,15 @@ static A2ATaskStore findStore(Exchange exchange, String 
taskId) {
                 return store;
             }
         }
-        // Fallback: scan component endpoints
-        try {
-            if (taskId != null) {
-                for (Endpoint ep : exchange.getContext().getEndpoints()) {
-                    if (ep instanceof A2AEndpoint a2aEp) {
-                        A2ATaskStore store = a2aEp.getTaskStore();
-                        if (store != null && store.get(taskId) != null) {
-                            return store;
-                        }
+        if (taskId != null) {
+            for (Endpoint ep : exchange.getContext().getEndpoints()) {

Review Comment:
   The previous code wrapped this endpoint scan in a try-catch that swallowed 
all exceptions with `// Component not found`. The removal is likely an 
improvement (the old catch was too broad), but it's a subtle behavior change — 
if `getEndpoints()` or `getTaskStore()` throws for any reason, the exception 
now propagates instead of returning null. Worth noting for existing users who 
might have relied on the silent fallback.



##########
components/camel-ai/camel-a2a/src/main/java/org/apache/camel/component/a2a/A2AConsumer.java:
##########
@@ -1208,12 +1210,20 @@ private SendMessageResponse 
processSendMessage(SendMessageRequest request, Excha
                                           + 
getEndpoint().getConfiguration().getMaxConcurrentTasks() + " concurrent tasks");
         }
         try {
+            if (createdTask) {

Review Comment:
   The early task creation (`store.put` + `notifySubscribers` before 
`getProcessor().process()`) and the new catch block for failure status are 
functional changes to the consumer lifecycle that are independent of the 
`a2aSubTask` model step. Bundling them makes the diff harder to review and the 
git history less useful. Consider splitting into a separate commit.



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