You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2019/06/25 04:03:00 UTC

[jira] [Resolved] (CAMEL-13651) Rest DSL seems to duplicate the routes, therefore we can experience on having duplicated ids issues

     [ https://issues.apache.org/jira/browse/CAMEL-13651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-13651.
---------------------------------
    Resolution: Implemented

> Rest DSL seems to duplicate the routes, therefore we can experience on having duplicated ids issues
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-13651
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13651
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.21.0
>            Reporter: Jonathan Vila
>            Priority: Major
>             Fix For: 2.23.0
>
>
> Having this route :
> {code:java}
> rest() 
>   .post("/upload/{customerID}") 
>     .to("direct:upload") 
>   .get("/health") 
>     .to("log:health") 
>   .get("/info") 
>     .to("log:info");
> {code}
> When I inspect *camelContext.getRoutes()* I see route1, route2, route3, post1, get1, get2 and route1 is identical to post1, and so on.
> So , if I try to assign an id to a route :
> {code:java}
>         rest()
>                 .id("rest-route")
>                 .get("/health")
>                     .id("get-health")
>                     .to("log:health")
>                 .post("/uploadXX/{customerID}")
>                     .id("post-upload")
>                     .to("direct:upload")
>                 .get("/info")
>                     .id("get-info")
>                     .to("log:info");
> {code}
> Then I get an error : Failed to start route get-health because of duplicate id detected: get-health
> The motivation to give ids to rest routes is to test only one at a time. I do that using *@AdviceWith* and then *camelContext.startRoute("post1")*
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)