This is an automated email from the ASF dual-hosted git repository.
Croway pushed a commit to branch camel-spring-boot-4.22.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/camel-spring-boot-4.22.x by
this push:
new 90425218605 Add camel-a2a-starter
90425218605 is described below
commit 90425218605766589f071f6ff10de78fb64105bd
Author: croway <[email protected]>
AuthorDate: Wed Sep 2 14:26:54 2026 +0200
Add camel-a2a-starter
camel-a2a has been in Camel core since 4.21.0 (CAMEL-23063) but never got a
Spring Boot starter. Generate it with starter-create and regenerate the
docs, catalog and BOM entries.
Add a smoke test that runs the A2A consumer on the servlet-based
platform-http engine and checks the agent card, the REST message:send
custom-method path, the JSON-RPC binding and incremental SSE delivery
for message:stream.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HNayxoB3xa9zbVDM84QiS5
(cherry picked from commit a9f7bc9bfda1248dcc01f314973edf13a4419508)
---
.../camel/springboot/catalog/components.properties | 1 +
.../camel/springboot/catalog/components/a2a.json | 90 +++++++++
components-starter/camel-a2a-starter/pom.xml | 60 ++++++
.../camel-a2a-starter/src/main/docs/a2a.json | 53 ++++++
.../springboot/A2AComponentAutoConfiguration.java | 73 ++++++++
.../a2a/springboot/A2AComponentConfiguration.java | 95 ++++++++++
.../src/main/resources/META-INF/LICENSE.txt | 203 +++++++++++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 ++
...rk.boot.autoconfigure.AutoConfiguration.imports | 17 ++
.../a2a/springboot/A2AStarterSmokeTest.java | 151 +++++++++++++++
.../test/resources/cards/streaming-agent-card.json | 31 ++++
components-starter/pom.xml | 1 +
docs/spring-boot/modules/ROOT/nav.adoc | 1 +
.../modules/ROOT/pages/starters/a2a.adoc | 35 ++++
tooling/camel-spring-boot-bom/pom.xml | 5 +
tooling/camel-spring-boot-dependencies/pom.xml | 5 +
16 files changed, 832 insertions(+)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
index a9fc81f0534..35557480593 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
@@ -1,3 +1,4 @@
+a2a
activemq
activemq6
ai-tool
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/a2a.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/a2a.json
new file mode 100644
index 00000000000..16bb67311e7
--- /dev/null
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/a2a.json
@@ -0,0 +1,90 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "a2a",
+ "title": "A2A",
+ "description": "A2A endpoint for agent-to-agent communication.",
+ "deprecated": false,
+ "firstVersion": "4.21.0",
+ "label": "ai",
+ "javaType": "org.apache.camel.component.a2a.A2AComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel.springboot",
+ "artifactId": "camel-a2a-starter",
+ "version": "4.22.1-SNAPSHOT",
+ "scheme": "a2a",
+ "extendsScheme": "",
+ "syntax": "a2a:agentCardSource",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": false,
+ "lenientProperties": false,
+ "browsable": false,
+ "remote": true
+ },
+ "componentProperties": {
+ "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName":
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Allows for bridging the consumer to the Camel routing Error Handler, which
mean any exceptions (if possible) occurred while the Camel consumer is trying
to pickup incoming messages, or the like [...]
+ "lazyStartProducer": { "index": 1, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fail [...]
+ "autowiredEnabled": { "index": 2, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
+ },
+ "headers": {
+ "CamelA2AOperation": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "A2A operation to invoke", "constantName":
"org.apache.camel.component.a2a.A2AConstants#OPERATION" },
+ "CamelA2ATaskId": { "index": 1, "kind": "header", "displayName": "",
"group": "common", "label": "common", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Task ID", "constantName":
"org.apache.camel.component.a2a.A2AConstants#TASK_ID" },
+ "CamelA2APushConfigId": { "index": 2, "kind": "header", "displayName": "",
"group": "common", "label": "common", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Push notification config ID", "constantName":
"org.apache.camel.component.a2a.A2AConstants#PUSH_CONFIG_ID" },
+ "CamelA2AContextId": { "index": 3, "kind": "header", "displayName": "",
"group": "common", "label": "common", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Context ID for multi-turn conversations",
"constantName": "org.apache.camel.component.a2a.A2AConstants#CONTEXT_ID" },
+ "CamelA2AMessageId": { "index": 4, "kind": "header", "displayName": "",
"group": "common", "label": "common", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Message ID", "constantName":
"org.apache.camel.component.a2a.A2AConstants#MESSAGE_ID" },
+ "CamelA2ATaskState": { "index": 5, "kind": "header", "displayName": "",
"group": "common", "label": "common", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Task state", "constantName":
"org.apache.camel.component.a2a.A2AConstants#TASK_STATE" },
+ "CamelA2AMethod": { "index": 6, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "A2A method name invoked", "constantName":
"org.apache.camel.component.a2a.A2AConstants#METHOD" },
+ "CamelA2AResponseType": { "index": 7, "kind": "header", "displayName": "",
"group": "common", "label": "common", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Response type: task or message", "constantName":
"org.apache.camel.component.a2a.A2AConstants#RESPONSE_TYPE" },
+ "CamelA2AReturnImmediately": { "index": 8, "kind": "header",
"displayName": "", "group": "common", "label": "common", "required": false,
"javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Return immediately flag",
"constantName":
"org.apache.camel.component.a2a.A2AConstants#RETURN_IMMEDIATELY" },
+ "CamelA2AHistoryLength": { "index": 9, "kind": "header", "displayName":
"", "group": "common", "label": "common", "required": false, "javaType":
"Integer", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "Max history messages", "constantName":
"org.apache.camel.component.a2a.A2AConstants#HISTORY_LENGTH" },
+ "CamelA2AStreamEmitter": { "index": 10, "kind": "header", "displayName":
"", "group": "consumer", "label": "consumer", "required": false, "javaType":
"org.apache.camel.component.a2a.streaming.A2AStreamEmitter", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "SSE stream emitter for route processors", "constantName":
"org.apache.camel.component.a2a.A2AConstants#STREAM_EMITTER" },
+ "CamelA2AListContextId": { "index": 11, "kind": "header", "displayName":
"", "group": "common", "label": "common", "required": false, "javaType":
"String", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "Context ID filter for task listing",
"constantName": "org.apache.camel.component.a2a.A2AConstants#LIST_CONTEXT_ID" },
+ "CamelA2AListPageSize": { "index": 12, "kind": "header", "displayName":
"", "group": "common", "label": "common", "required": false, "javaType":
"Integer", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "Page size for task listing", "constantName":
"org.apache.camel.component.a2a.A2AConstants#LIST_PAGE_SIZE" },
+ "CamelA2AListPageToken": { "index": 13, "kind": "header", "displayName":
"", "group": "common", "label": "common", "required": false, "javaType":
"String", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "Page token for task listing pagination",
"constantName": "org.apache.camel.component.a2a.A2AConstants#LIST_PAGE_TOKEN" },
+ "CamelA2AListIncludeArtifacts": { "index": 14, "kind": "header",
"displayName": "", "group": "common", "label": "common", "required": false,
"javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Whether to include artifacts in task
listing", "constantName":
"org.apache.camel.component.a2a.A2AConstants#LIST_INCLUDE_ARTIFACTS" },
+ "CamelA2AListHistoryLength": { "index": 15, "kind": "header",
"displayName": "", "group": "common", "label": "common", "required": false,
"javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "History length for task listing",
"constantName":
"org.apache.camel.component.a2a.A2AConstants#LIST_HISTORY_LENGTH" },
+ "CamelA2AListStatusTimestampAfter": { "index": 16, "kind": "header",
"displayName": "", "group": "common", "label": "common", "required": false,
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Filter tasks by status timestamp after
this value", "constantName":
"org.apache.camel.component.a2a.A2AConstants#LIST_STATUS_TIMESTAMP_AFTER" },
+ "CamelA2AListStatus": { "index": 17, "kind": "header", "displayName": "",
"group": "common", "label": "common", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Comma-separated status filter for task listing",
"constantName": "org.apache.camel.component.a2a.A2AConstants#LIST_STATUS" },
+ "CamelA2AExtensions": { "index": 18, "kind": "header", "displayName": "",
"group": "consumer", "label": "consumer", "required": false, "javaType":
"java.util.List", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Negotiated A2A extension URIs requested
by the client", "constantName":
"org.apache.camel.component.a2a.A2AConstants#EXTENSIONS" }
+ },
+ "properties": {
+ "agentCardSource": { "index": 0, "kind": "path", "displayName": "Agent
Card Source", "group": "common", "label": "", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
agent card source (classpath:, file:, http:\/\/, https:\/\/, or plain name)" },
+ "agentCard": { "index": 1, "kind": "parameter", "displayName": "Agent
Card", "group": "common", "label": "", "required": false, "type": "object",
"javaType": "org.apache.camel.component.a2a.model.AgentCard", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Agent card bean
reference or inline configuration" },
+ "basePath": { "index": 2, "kind": "parameter", "displayName": "Base Path",
"group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "The base path for HTTP requests" },
+ "dataFormat": { "index": 3, "kind": "parameter", "displayName": "Data
Format", "group": "common", "label": "", "required": false, "type": "enum",
"javaType": "org.apache.camel.component.a2a.A2ADataFormat", "enum": [
"PAYLOAD", "POJO", "RAW" ], "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": "PAYLOAD",
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "The data [...]
+ "description": { "index": 4, "kind": "parameter", "displayName":
"Description", "group": "common", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "The agent description
(overrides agent card)" },
+ "historyLength": { "index": 5, "kind": "parameter", "displayName":
"History Length", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Maximum number of
history messages to include in the context" },
+ "host": { "index": 6, "kind": "parameter", "displayName": "Host", "group":
"common", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "The host to connect to for producers" },
+ "name": { "index": 7, "kind": "parameter", "displayName": "Name", "group":
"common", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "The agent name (overrides agent card)" },
+ "port": { "index": 8, "kind": "parameter", "displayName": "Port", "group":
"common", "label": "", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "The port to connect to for producers" },
+ "protocolBinding": { "index": 9, "kind": "parameter", "displayName":
"Protocol Binding", "group": "common", "label": "", "required": false, "type":
"enum", "javaType": "java.lang.String", "enum": [ "HTTP+JSON", "JSONRPC" ],
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "defaultValue": "HTTP+JSON", "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "The protocol binding to us [...]
+ "returnImmediately": { "index": 10, "kind": "parameter", "displayName":
"Return Immediately", "group": "common", "label": "", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue":
false, "configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Whether to return
immediately without waiting for task completion" },
+ "validateAuth": { "index": 11, "kind": "parameter", "displayName":
"Validate Auth", "group": "common", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "security": "insecure:dev",
"insecureValue": "false", "defaultValue": true, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "Whether to validate authen [...]
+ "version": { "index": 12, "kind": "parameter", "displayName": "Version",
"group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "The agent version (overrides agent card)" },
+ "bridgeErrorHandler": { "index": 13, "kind": "parameter", "displayName":
"Bridge Error Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions (if possible) occurred
while the Camel consumer is trying to pickup incoming [...]
+ "exceptionHandler": { "index": 14, "kind": "parameter", "displayName":
"Exception Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "autowired": false, "secret": false, "description": "To
let the consumer use a custom ExceptionHandler. Notice if the option
bridgeErrorHandler is enabled then this option is not in use. By de [...]
+ "exchangePattern": { "index": 15, "kind": "parameter", "displayName":
"Exchange Pattern", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "enum", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ],
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the exchange pattern when the consumer creates an exchange." },
+ "httpServerComponent": { "index": 16, "kind": "parameter", "displayName":
"Http Server Component", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "The Camel HTTP component to use for serving
incom [...]
+ "maxConcurrentTasks": { "index": 17, "kind": "parameter", "displayName":
"Max Concurrent Tasks", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "Maximum number of tasks the agent can proces
[...]
+ "sseHeartbeatInterval": { "index": 18, "kind": "parameter", "displayName":
"Sse Heartbeat Interval", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "integer", "javaType": "long",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "defaultValue": 15000, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "Interval in milliseconds for SSE ke [...]
+ "sseQueueCapacity": { "index": 19, "kind": "parameter", "displayName":
"Sse Queue Capacity", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "defaultValue": 1000, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "Maximum number of SSE events that can be buff
[...]
+ "taskQueueSize": { "index": 20, "kind": "parameter", "displayName": "Task
Queue Size", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 0,
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Maximum number of tasks
that can wait in the pending q [...]
+ "operation": { "index": 21, "kind": "parameter", "displayName":
"Operation", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.a2a.operation.A2AOperations", "enum": [
"MESSAGE_SEND", "MESSAGE_STREAM", "TASK_GET", "TASK_LIST", "TASK_CANCEL",
"TASK_SUBSCRIBE", "PUSH_CONFIG_CREATE", "PUSH_CONFIG_GET", "PUSH_CONFIG_LIST",
"PUSH_CONFIG_DELETE" ], "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": fal [...]
+ "connectTimeout": { "index": 22, "kind": "parameter", "displayName":
"Connect Timeout", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "integer", "javaType": "long",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "defaultValue": 30000, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "Connect timeout in milliseconds for the HTTP
cli [...]
+ "lazyStartProducer": { "index": 23, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
+ "streamingReadTimeout": { "index": 24, "kind": "parameter", "displayName":
"Streaming Read Timeout", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "integer", "javaType": "long",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "defaultValue": 300000, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "Read timeout in milliseconds for t [...]
+ "asyncTimeout": { "index": 25, "kind": "parameter", "displayName": "Async
Timeout", "group": "advanced", "label": "advanced", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": 300000,
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Timeout in milliseconds
for asynchronous task operations" },
+ "completedTaskTtl": { "index": 26, "kind": "parameter", "displayName":
"Completed Task Ttl", "group": "advanced", "label": "advanced", "required":
false, "type": "integer", "javaType": "long", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue":
3600000, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "Time-to-live in milliseconds for completed
tasks before cleanup" },
+ "followRedirects": { "index": 27, "kind": "parameter", "displayName":
"Follow Redirects", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue":
false, "configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Whether the HTTP client
should follow redirects. Disabled by de [...]
+ "maxPayloadSize": { "index": 28, "kind": "parameter", "displayName": "Max
Payload Size", "group": "advanced", "label": "advanced", "required": false,
"type": "integer", "javaType": "long", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "defaultValue": 6291456,
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Maximum payload size in
bytes (default 6MB)" },
+ "pushRetryAttempts": { "index": 29, "kind": "parameter", "displayName":
"Push Retry Attempts", "group": "advanced", "label": "advanced", "required":
false, "type": "integer", "javaType": "int", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 3,
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Maximum number of retry
attempts for push notification webhook del [...]
+ "pushRetryBackoffMs": { "index": 30, "kind": "parameter", "displayName":
"Push Retry Backoff Ms", "group": "advanced", "label": "advanced", "required":
false, "type": "integer", "javaType": "long", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue":
1000, "configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "Initial backoff in
milliseconds for push notification retry [...]
+ "allowLocalWebhookUrls": { "index": 31, "kind": "parameter",
"displayName": "Allow Local Webhook Urls", "group": "security", "label":
"consumer,security", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "security": "insecure:dev", "insecureValue": "true",
"defaultValue": false, "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "de [...]
+ "apiKey": { "index": 32, "kind": "parameter", "displayName": "Api Key",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "API key for authentication" },
+ "apiKeyHeader": { "index": 33, "kind": "parameter", "displayName": "Api
Key Header", "group": "security", "label": "security", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "defaultValue":
"Authorization", "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "HTTP header name for API key authentication
(e.g., [...]
+ "bearerToken": { "index": 34, "kind": "parameter", "displayName": "Bearer
Token", "group": "security", "label": "security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": true, "security":
"secret", "configurationClass":
"org.apache.camel.component.a2a.A2AConfiguration", "configurationField":
"configuration", "description": "Bearer token for authentication" },
+ "oauthProfile": { "index": 35, "kind": "parameter", "displayName": "Oauth
Profile", "group": "security", "label": "security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.a2a.A2AConfiguration",
"configurationField": "configuration", "description": "OAuth profile name for
obtaining an access token via the OAuth 2.0 Client Credential [...]
+ }
+}
diff --git a/components-starter/camel-a2a-starter/pom.xml
b/components-starter/camel-a2a-starter/pom.xml
new file mode 100644
index 00000000000..fd13f64b95d
--- /dev/null
+++ b/components-starter/camel-a2a-starter/pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>components-starter</artifactId>
+ <version>4.22.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>camel-a2a-starter</artifactId>
+ <packaging>jar</packaging>
+ <name>Camel SB Starters :: a2a</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <version>${spring-boot-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-a2a</artifactId>
+ <version>${camel-version}</version>
+ </dependency>
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>camel-platform-http-starter</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <version>${spring-boot-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <!--START OF GENERATED CODE-->
+ <dependency>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>camel-core-starter</artifactId>
+ </dependency>
+ <!--END OF GENERATED CODE-->
+ </dependencies>
+</project>
diff --git a/components-starter/camel-a2a-starter/src/main/docs/a2a.json
b/components-starter/camel-a2a-starter/src/main/docs/a2a.json
new file mode 100644
index 00000000000..d74305371e9
--- /dev/null
+++ b/components-starter/camel-a2a-starter/src/main/docs/a2a.json
@@ -0,0 +1,53 @@
+{
+ "groups": [
+ {
+ "name": "camel.component.a2a",
+ "type":
"org.apache.camel.component.a2a.springboot.A2AComponentConfiguration",
+ "sourceType":
"org.apache.camel.component.a2a.springboot.A2AComponentConfiguration"
+ },
+ {
+ "name": "camel.component.a2a.customizer",
+ "type":
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties",
+ "sourceType":
"org.apache.camel.component.a2a.springboot.A2AComponentConfiguration",
+ "sourceMethod": "getCustomizer()"
+ }
+ ],
+ "properties": [
+ {
+ "name": "camel.component.a2a.autowired-enabled",
+ "type": "java.lang.Boolean",
+ "description": "Whether autowiring is enabled. This is used for
automatic autowiring options (the option must be marked as autowired) by
looking up in the registry to find if there is a single instance of matching
type, which then gets configured on the component. This can be used for
automatic configuring JDBC data sources, JMS connection factories, AWS Clients,
etc.",
+ "sourceType":
"org.apache.camel.component.a2a.springboot.A2AComponentConfiguration",
+ "defaultValue": true
+ },
+ {
+ "name": "camel.component.a2a.bridge-error-handler",
+ "type": "java.lang.Boolean",
+ "description": "Allows for bridging the consumer to the Camel routing
Error Handler, which mean any exceptions (if possible) occurred while the Camel
consumer is trying to pickup incoming messages, or the likes, will now be
processed as a message and handled by the routing Error Handler. Important:
This is only possible if the 3rd party component allows Camel to be alerted if
an exception was thrown. Some components handle this internally only, and
therefore bridgeErrorHandler is n [...]
+ "sourceType":
"org.apache.camel.component.a2a.springboot.A2AComponentConfiguration",
+ "defaultValue": false
+ },
+ {
+ "name": "camel.component.a2a.customizer.enabled",
+ "type": "java.lang.Boolean",
+ "sourceType":
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties"
+ },
+ {
+ "name": "camel.component.a2a.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Whether to enable auto configuration of the a2a
component. This is enabled by default.",
+ "sourceType":
"org.apache.camel.component.a2a.springboot.A2AComponentConfiguration"
+ },
+ {
+ "name": "camel.component.a2a.lazy-start-producer",
+ "type": "java.lang.Boolean",
+ "description": "Whether the producer should be started lazy (on the
first message). By starting lazy you can use this to allow CamelContext and
routes to startup in situations where a producer may otherwise fail during
starting and cause the route to fail being started. By deferring this startup
to be lazy then the startup failure can be handled during routing messages via
Camel's routing error handlers. Beware that when the first message is processed
then creating and starting the [...]
+ "sourceType":
"org.apache.camel.component.a2a.springboot.A2AComponentConfiguration",
+ "defaultValue": false
+ }
+ ],
+ "hints": [],
+ "ignored": {
+ "properties": []
+ }
+}
\ No newline at end of file
diff --git
a/components-starter/camel-a2a-starter/src/main/java/org/apache/camel/component/a2a/springboot/A2AComponentAutoConfiguration.java
b/components-starter/camel-a2a-starter/src/main/java/org/apache/camel/component/a2a/springboot/A2AComponentAutoConfiguration.java
new file mode 100644
index 00000000000..0f97a853dfb
--- /dev/null
+++
b/components-starter/camel-a2a-starter/src/main/java/org/apache/camel/component/a2a/springboot/A2AComponentAutoConfiguration.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.a2a.springboot;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.component.a2a.A2AComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import
org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
+import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import
org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@AutoConfiguration(after = CamelAutoConfiguration.class)
+@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,A2AComponentConfiguration.class})
+@ConditionalOnHierarchicalProperties({"camel.component",
"camel.component.a2a"})
+public class A2AComponentAutoConfiguration {
+
+ private final ApplicationContext applicationContext;
+ private final A2AComponentConfiguration configuration;
+
+ public A2AComponentAutoConfiguration(
+ org.springframework.context.ApplicationContext applicationContext,
+
org.apache.camel.component.a2a.springboot.A2AComponentConfiguration
configuration) {
+ this.applicationContext = applicationContext;
+ this.configuration = configuration;
+ }
+
+ @Lazy
+ @Bean
+ public ComponentCustomizer configureA2AComponent() {
+ return new ComponentCustomizer() {
+ @Override
+ public void configure(String name, Component target) {
+ CamelPropertiesHelper.copyProperties(target.getCamelContext(),
configuration, target);
+ }
+ @Override
+ public boolean isEnabled(String name, Component target) {
+ return HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext,
+ "camel.component.customizer",
+ "camel.component.a2a.customizer")
+ && target instanceof A2AComponent;
+ }
+ };
+ }
+}
\ No newline at end of file
diff --git
a/components-starter/camel-a2a-starter/src/main/java/org/apache/camel/component/a2a/springboot/A2AComponentConfiguration.java
b/components-starter/camel-a2a-starter/src/main/java/org/apache/camel/component/a2a/springboot/A2AComponentConfiguration.java
new file mode 100644
index 00000000000..922e3d54a9a
--- /dev/null
+++
b/components-starter/camel-a2a-starter/src/main/java/org/apache/camel/component/a2a/springboot/A2AComponentConfiguration.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.a2a.springboot;
+
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * A2A endpoint for agent-to-agent communication.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.component.a2a")
+public class A2AComponentConfiguration
+ extends
+ ComponentConfigurationPropertiesCommon {
+
+ /**
+ * Whether to enable auto configuration of the a2a component. This is
+ * enabled by default.
+ */
+ private Boolean enabled;
+ /**
+ * Allows for bridging the consumer to the Camel routing Error Handler,
+ * which mean any exceptions (if possible) occurred while the Camel
consumer
+ * is trying to pickup incoming messages, or the likes, will now be
+ * processed as a message and handled by the routing Error Handler.
+ * Important: This is only possible if the 3rd party component allows Camel
+ * to be alerted if an exception was thrown. Some components handle this
+ * internally only, and therefore bridgeErrorHandler is not possible. In
+ * other situations we may improve the Camel component to hook into the 3rd
+ * party component and make this possible for future releases. By default
+ * the consumer will use the org.apache.camel.spi.ExceptionHandler to deal
+ * with exceptions, that will be logged at WARN or ERROR level and ignored.
+ */
+ private Boolean bridgeErrorHandler = false;
+ /**
+ * Whether the producer should be started lazy (on the first message). By
+ * starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
starting
+ * and cause the route to fail being started. By deferring this startup to
+ * be lazy then the startup failure can be handled during routing messages
+ * via Camel's routing error handlers. Beware that when the first message
is
+ * processed then creating and starting the producer may take a little time
+ * and prolong the total processing time of the processing.
+ */
+ private Boolean lazyStartProducer = false;
+ /**
+ * Whether autowiring is enabled. This is used for automatic autowiring
+ * options (the option must be marked as autowired) by looking up in the
+ * registry to find if there is a single instance of matching type, which
+ * then gets configured on the component. This can be used for automatic
+ * configuring JDBC data sources, JMS connection factories, AWS Clients,
+ * etc.
+ */
+ private Boolean autowiredEnabled = true;
+
+ public Boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(Boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public Boolean getLazyStartProducer() {
+ return lazyStartProducer;
+ }
+
+ public void setLazyStartProducer(Boolean lazyStartProducer) {
+ this.lazyStartProducer = lazyStartProducer;
+ }
+
+ public Boolean getAutowiredEnabled() {
+ return autowiredEnabled;
+ }
+
+ public void setAutowiredEnabled(Boolean autowiredEnabled) {
+ this.autowiredEnabled = autowiredEnabled;
+ }
+}
\ No newline at end of file
diff --git
a/components-starter/camel-a2a-starter/src/main/resources/META-INF/LICENSE.txt
b/components-starter/camel-a2a-starter/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 00000000000..6b0b1270ff0
--- /dev/null
+++
b/components-starter/camel-a2a-starter/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git
a/components-starter/camel-a2a-starter/src/main/resources/META-INF/NOTICE.txt
b/components-starter/camel-a2a-starter/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 00000000000..2e215bf2e6b
--- /dev/null
+++
b/components-starter/camel-a2a-starter/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Camel distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the different LICENSE files present in the licenses directory of
+ this distribution.
diff --git
a/components-starter/camel-a2a-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
b/components-starter/camel-a2a-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 00000000000..f041fb7e9dc
--- /dev/null
+++
b/components-starter/camel-a2a-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1,17 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+org.apache.camel.component.a2a.springboot.A2AComponentAutoConfiguration
diff --git
a/components-starter/camel-a2a-starter/src/test/java/org/apache/camel/component/a2a/springboot/A2AStarterSmokeTest.java
b/components-starter/camel-a2a-starter/src/test/java/org/apache/camel/component/a2a/springboot/A2AStarterSmokeTest.java
new file mode 100644
index 00000000000..b737d510964
--- /dev/null
+++
b/components-starter/camel-a2a-starter/src/test/java/org/apache/camel/component/a2a/springboot/A2AStarterSmokeTest.java
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.a2a.springboot;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.nio.charset.StandardCharsets;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.spring.junit6.CamelSpringBootTest;
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.web.server.LocalServerPort;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+@EnableAutoConfiguration
+@CamelSpringBootTest
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
+ classes = { A2AStarterSmokeTest.TestRoutes.class })
+class A2AStarterSmokeTest {
+
+ private static final ObjectMapper MAPPER = new ObjectMapper();
+ private static final String SEND_BODY
+ =
"{\"message\":{\"messageId\":\"msg-1\",\"role\":\"user\",\"parts\":[{\"text\":\"Hello\"}]}}";
+
+ @LocalServerPort
+ private int port;
+
+ private final HttpClient http = HttpClient.newHttpClient();
+
+ @Configuration
+ static class TestRoutes {
+ @Bean
+ RouteBuilder a2aRoutes() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+
from("a2a:classpath:cards/streaming-agent-card.json?validateAuth=false&sseHeartbeatInterval=200")
+ .delay(1500)
+ .setBody(constant("Echo from Spring Boot"));
+
from("a2a:rpc-agent?name=JsonRpcAgent&version=1.0.0&protocolBinding=jsonrpc&basePath=/rpc&validateAuth=false")
+ .setBody(constant("JSON-RPC echo"));
+ }
+ };
+ }
+ }
+
+ @Test
+ void agentCard() throws Exception {
+ HttpResponse<String> response = http.send(
+ HttpRequest.newBuilder(URI.create(baseUrl() +
"/.well-known/agent-card.json")).GET().build(),
+ HttpResponse.BodyHandlers.ofString());
+ assertEquals(200, response.statusCode(), response.body());
+ JsonNode card = MAPPER.readTree(response.body());
+ assertEquals("SpringBootAgent", card.get("name").asText());
+ }
+
+ @Test
+ void sendMessageViaRestCustomMethodPath() throws Exception {
+ HttpResponse<String> response = post("/message:send", SEND_BODY,
"application/a2a+json");
+ assertEquals(200, response.statusCode(), response.body());
+ JsonNode body = MAPPER.readTree(response.body());
+ assertTrue(body.has("task"), response.body());
+ assertFalse(body.get("task").get("id").asText().isEmpty());
+ }
+
+ @Test
+ void sendMessageViaJsonRpc() throws Exception {
+ String request =
"{\"jsonrpc\":\"2.0\",\"method\":\"SendMessage\",\"params\":{\"message\":{\"messageId\":\"msg-jrpc\","
+ + "\"role\":\"user\",\"parts\":[{\"text\":\"Hello
JSON-RPC\"}]}},\"id\":\"req-1\"}";
+ HttpResponse<String> response = post("/rpc/", request,
"application/json");
+ assertEquals(200, response.statusCode(), response.body());
+ JsonNode body = MAPPER.readTree(response.body());
+ assertEquals("2.0", body.get("jsonrpc").asText());
+ assertEquals("req-1", body.get("id").asText());
+ assertNotNull(body.get("result").get("task").get("id"));
+ }
+
+ @Test
+ void streamMessageDeliversSseIncrementally() throws Exception {
+ long start = System.nanoTime();
+ HttpResponse<InputStream> response = http.send(
+ HttpRequest.newBuilder(URI.create(baseUrl() +
"/message:stream"))
+ .header("Content-Type", "application/a2a+json")
+ .POST(HttpRequest.BodyPublishers.ofString(SEND_BODY))
+ .build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ assertEquals(200, response.statusCode());
+
assertTrue(response.headers().firstValue("Content-Type").orElse("").startsWith("text/event-stream"),
+ response.headers().toString());
+
+ StringBuilder all = new StringBuilder();
+ long firstLineMillis = -1;
+ try (BufferedReader reader = new BufferedReader(
+ new InputStreamReader(response.body(),
StandardCharsets.UTF_8))) {
+ String line;
+ while ((line = reader.readLine()) != null) {
+ if (firstLineMillis < 0 && !line.isBlank()) {
+ firstLineMillis = (System.nanoTime() - start) / 1_000_000;
+ }
+ all.append(line).append('\n');
+ }
+ }
+ String events = all.toString();
+ assertTrue(firstLineMillis >= 0 && firstLineMillis < 1500,
+ "first SSE bytes should arrive before the 1500ms route delay
completes, took " + firstLineMillis + "ms");
+ assertTrue(events.contains("TASK_STATE_COMPLETED"), events);
+ assertTrue(events.contains("Echo from Spring Boot"), events);
+ }
+
+ private HttpResponse<String> post(String path, String body, String
contentType) throws Exception {
+ return http.send(
+ HttpRequest.newBuilder(URI.create(baseUrl() + path))
+ .header("Content-Type", contentType)
+ .POST(HttpRequest.BodyPublishers.ofString(body))
+ .build(),
+ HttpResponse.BodyHandlers.ofString());
+ }
+
+ private String baseUrl() {
+ return "http://localhost:" + port;
+ }
+}
diff --git
a/components-starter/camel-a2a-starter/src/test/resources/cards/streaming-agent-card.json
b/components-starter/camel-a2a-starter/src/test/resources/cards/streaming-agent-card.json
new file mode 100644
index 00000000000..ff2ee9f8808
--- /dev/null
+++
b/components-starter/camel-a2a-starter/src/test/resources/cards/streaming-agent-card.json
@@ -0,0 +1,31 @@
+{
+ "protocolVersion": "1.0",
+ "name": "SpringBootAgent",
+ "description": "Streaming agent used by the Spring Boot starter smoke test",
+ "url": "http://localhost:8080",
+ "version": "1.0.0",
+ "capabilities": {
+ "streaming": true,
+ "pushNotifications": false,
+ "extendedAgentCard": false
+ },
+ "defaultInputModes": ["text/plain"],
+ "defaultOutputModes": ["text/plain"],
+ "skills": [
+ {
+ "id": "echo",
+ "name": "Echo",
+ "description": "Echoes a fixed response",
+ "tags": ["test"],
+ "inputModes": ["text/plain"],
+ "outputModes": ["text/plain"]
+ }
+ ],
+ "supportedInterfaces": [
+ {
+ "url": "http://localhost:8080",
+ "protocolBinding": "HTTP+JSON",
+ "protocolVersion": "1.0"
+ }
+ ]
+}
diff --git a/components-starter/pom.xml b/components-starter/pom.xml
index 82460720669..7baac5e41ab 100644
--- a/components-starter/pom.xml
+++ b/components-starter/pom.xml
@@ -105,6 +105,7 @@
</build>
<modules>
+ <module>camel-a2a-starter</module>
<module>camel-activemq-starter</module>
<module>camel-activemq6-starter</module>
<module>camel-ai-tool-starter</module>
diff --git a/docs/spring-boot/modules/ROOT/nav.adoc
b/docs/spring-boot/modules/ROOT/nav.adoc
index 9594299d575..c230d2d6821 100644
--- a/docs/spring-boot/modules/ROOT/nav.adoc
+++ b/docs/spring-boot/modules/ROOT/nav.adoc
@@ -4,6 +4,7 @@
* xref:starter-configuration.adoc[Starter Configuration]
* Starters
// starters: START
+** xref:starters/a2a.adoc[A2A]
** xref:starters/activemq.adoc[ActiveMQ 5.x]
** xref:starters/activemq6.adoc[ActiveMQ 6.x]
** xref:starters/ai-tool.adoc[AI Tool]
diff --git a/docs/spring-boot/modules/ROOT/pages/starters/a2a.adoc
b/docs/spring-boot/modules/ROOT/pages/starters/a2a.adoc
new file mode 100644
index 00000000000..6657c47b5c0
--- /dev/null
+++ b/docs/spring-boot/modules/ROOT/pages/starters/a2a.adoc
@@ -0,0 +1,35 @@
+// Do not edit directly!
+// This file was generated by camel-spring-boot-generator-maven-plugin
+= A2A
+:artifactid: camel-a2a-starter
+
+A2A endpoint for agent-to-agent communication.
+
+== What's inside
+
+* xref:{csb-camel-components}::a2a-component.adoc[A2A component], URI syntax:
`a2a:agentCardSource`
+
+Please refer to the above links for usage and configuration details.
+
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>camel-a2a-starter</artifactId>
+</dependency>
+----
+
+== Spring Boot Auto-Configuration
+
+The starter supports 4 options, which are listed below.
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| camel.component.a2a.autowired-enabled | Whether autowiring is enabled. This
is used for automatic autowiring options (the option must be marked as
autowired) by looking up in the registry to find if there is a single instance
of matching type, which then gets configured on the component. This can be used
for automatic configuring JDBC data sources, JMS connection factories, AWS
Clients, etc. | true | Boolean
+| camel.component.a2a.bridge-error-handler | Allows for bridging the consumer
to the Camel routing Error Handler, which mean any exceptions (if possible)
occurred while the Camel consumer is trying to pickup incoming messages, or the
likes, will now be processed as a message and handled by the routing Error
Handler. Important: This is only possible if the 3rd party component allows
Camel to be alerted if an exception was thrown. Some components handle this
internally only, and therefore [...]
+| camel.component.a2a.enabled | Whether to enable auto configuration of the
a2a component. This is enabled by default. | | Boolean
+| camel.component.a2a.lazy-start-producer | Whether the producer should be
started lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a producer may otherwise
fail during starting and cause the route to fail being started. By deferring
this startup to be lazy then the startup failure can be handled during routing
messages via Camel's routing error handlers. Beware that when the first message
is processed then cre [...]
+|===
diff --git a/tooling/camel-spring-boot-bom/pom.xml
b/tooling/camel-spring-boot-bom/pom.xml
index 4a1480d7ef1..27f0640ed50 100644
--- a/tooling/camel-spring-boot-bom/pom.xml
+++ b/tooling/camel-spring-boot-bom/pom.xml
@@ -33,6 +33,11 @@
<description>Camel Spring-Boot BOM</description>
<dependencyManagement>
<dependencies>
+ <dependency>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>camel-a2a-starter</artifactId>
+ <version>4.22.1-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-activemq-starter</artifactId>
diff --git a/tooling/camel-spring-boot-dependencies/pom.xml
b/tooling/camel-spring-boot-dependencies/pom.xml
index 06fb7b6d9ea..5e106781c68 100644
--- a/tooling/camel-spring-boot-dependencies/pom.xml
+++ b/tooling/camel-spring-boot-dependencies/pom.xml
@@ -307,6 +307,11 @@
<artifactId>camel-servicenow-maven-plugin</artifactId>
<version>4.22.1-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>camel-a2a-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-activemq-starter</artifactId>