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

Cameron Fitzwater commented on CAMEL-22666:
-------------------------------------------

[~davsclaus]  - reopening.... using routeId throws an error so I am not sure 
that YAML understands this:
{code:java}
Unsupported field: routeId
 in file:main.yaml, line 2, column 5:
        routeId: "abc" {code}
 

 
{code:java}
- from:
    routeId: "abc"
    uri: "direct:getABC"
    steps:
      - log: "START" {code}

Documentation also only shows using the outer route method:
https://camel.apache.org/manual/faq/how-do-i-name-my-routes.html

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

Reply via email to