[
https://issues.apache.org/jira/browse/CAMEL-22666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035854#comment-18035854
]
Claus Ibsen commented on CAMEL-22666:
-------------------------------------
No you set the id on the route, not on from. The Java DSL has a special syntax
due to how it historically was created.
> feat: camel-from - yaml to support an id
> ----------------------------------------
>
> Key: CAMEL-22666
> URL: https://issues.apache.org/jira/browse/CAMEL-22666
> Project: Camel
> Issue Type: New Feature
> Reporter: Cameron Fitzwater
> Priority: Minor
>
> YAML DSL is currently allows "id" inside 'from:' but it appears to be
> silently ignored.
> {code:java}
> - from:
> id: "abc"
> uri: "direct:getABC"
> steps:
> - log: "START"{code}
> Output:
> {code:java}
> Routes startup (total:1)
> Started route1 (direct://getABC){code}
> Setting an identifiers is helpful for metrics (if we n+1 routes, no idea what
> "route1" means). The current workaround seems to be to define it at the route
> level:
> {code:java}
> - route:
> id: "abc"
> from:
> uri: "direct:getABC"
> steps:
> - log: "START"{code}
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)