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

Amit Patel commented on CAMEL-5535:
-----------------------------------

I did the unit test with Camel 2.10.0 and Camel 2.9.1 and i got same exception, 
but when I deploy same routes in spring XML DSL format into out application. It 
works fine with Camel 2.9.1. Both routes started successfully. I went to 
jconsole and collected dumpRouteAsXml. Below are the dumpRouteAsXml. Both 
routes has different route id but same URL. This feature is very critical to 
Restlet routes, so we can have different routes base on the restletMethods. Is 
anyway could you support this feature in next release?

  
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<route trace="true" id="nimbus.hello.restlet.1.0" 
xmlns="http://camel.apache.org/schema/spring";>
    <from uri="restlet:///nimbus/hello.restlet/1.0?restletMethods=post"/>
    <transform id="transform10">
        <simple>Hello Restlet Method: ${header.CamelHttpMethod} 
ID:${header.id}</simple>
    </transform>
</route>



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<route trace="true" id="nimbus.hello.restletGet.1.0" 
xmlns="http://camel.apache.org/schema/spring";>
    <from uri="restlet:///nimbus/hello.restlet/1.0?restletMethods=get"/>
    <transform id="transform9">
        <simple>Hello Restlet Method: ${header.CamelHttpMethod} 
ID:${header.id}</simple>
    </transform>
</route>

Thanks,
 
                
> Multiple restlet routes of the same restlet URI but different VERBs does not 
> work in Apache Camel 2.10.0 , both routes work in Apache Camel 2.9.1.  
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5535
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5535
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-restlet
>    Affects Versions: 2.10.0
>            Reporter: Amit Patel
>            Assignee: Willem Jiang
>
> Multiple restlet routes of the same restlet URI but different VERBs does not 
> work in Apache Camel 2.10.0 , both routes work in Apache Camel 2.9.1.  
> Reproduce Steps:
> -----------------
> 1) Add a restlet route with a from uri of 
> restlet:///nimbus/hello.restlet/1.0?restletMethods=get
> <route xmlns="http://camel.apache.org/schema/spring"; trace="true" >
>       <from uri="restlet:///nimbus/hello.restlet/1.0?restletMethods=get"/>
>     <transform>
>       <simple>Hello Restlet Method: ${header.CamelHttpMethod}  
> ID:${header.id}</simple>
>     </transform>
>   </route>
> 2) Add a restlet route with a from uri of 
> restlet:///nimbus/hello.restlet/1.0?restletMethods=post
>    <route xmlns="http://camel.apache.org/schema/spring"; trace="true" >
>       <from uri="restlet:///nimbus/hello.restlet/1.0?restletMethods=post"/>
>     <transform>
>       <simple>Hello Restlet Method: ${header.CamelHttpMethod}  
> ID:${header.id}</simple>
>     </transform>
>   </route>
> 3)  route 1work fine, but #2 results in the following exception. both route 
> work fine in Camel 2.9.1.
> Exception:
> 012-07-27 10:29:20,646-0400 ERROR grails.app.service.nimbus.ComputeService 
> localhost addRoute for hello.restletpost failed - Failed to start route 
> nimbus.hello.restletpost.1.0 because of Multiple consumers for the same 
> endpoint is not allowed: Endpoint[/nimbus/hello.restlet/1.0]
>  Caused by: org.apache.camel.FailedToStartRouteException: Failed to start 
> route nimbus.hello.restletpost.1.0 because of Multiple consumers for the same 
> endpoint is not allowed: Endpoint[/nimbus/hello.restlet/1.0]
>  at 
> org.apache.camel.impl.DefaultCamelContext(doStartOrResumeRouteConsumers:1993) 
> I've already posted on 
> http://camel.465427.n5.nabble.com/Apache-Camel-2-10-0-multiple-restlet-routes-of-the-same-restlet-URI-but-different-VERBs-does-not-work-td5716556.html
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to