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

ncasaux updated CAMEL-15895:
----------------------------
    Description: 
Hello,

 I’m using some camel rest routes and found something unexpected with the 
examples provided in [https://camel.apache.org/manual/latest/rest-dsl.html]

 
{code:java}
rest("/say")
         .get("/hello").to("direct:hello")
         .get("/bye").consumes("application/json").to("direct:bye")
         .post("/bye").to("mock:update");
 
 from("direct:hello")
         .transform().constant("Hello World");{code}
 

Those routes creates 3 netty consumers visible in JMX, consuming from following 
endpoints:
 * [http://0.0.0.0:0/say/bye?httpMethodRestrict=POST]
 * [http://0.0.0.0:0/say/bye?httpMethodRestrict=GET]
 * [http://0.0.0.0:0/say/hello?httpMethodRestrict=GET]

 However, in JMX, I can see only 2 of those endpoints: 
 * endpointBaseUri [http://0.0.0.0:0/say/bye], with endpointUri 
[http://0.0.0.0:0/say/bye?httpMethodRestrict=GET]
 * endpointBaseUri [http://0.0.0.0:0/say/hello], with endpointUri 
[http://0.0.0.0:0/say/hello?httpMethodRestrict=GET]

 

There is no endpoint for “POST” on “/bye”.

 

Maybe it’s because it would share the same endpointBaseUri than the endpoint 
for “GET” on “/bye” ?

 I attached a screenshot if this helps where we can see the 3 consumers and 
only 2 endpoints.

  !Capture.PNG!

Regards,

Nicolas

  was:
Hello,

 

I’m using some camel rest routes and found something unexpected with the 
examples provided in [https://camel.apache.org/manual/latest/rest-dsl.html]

 

 
{code:java}
rest("/say")
         .get("/hello").to("direct:hello")
         .get("/bye").consumes("application/json").to("direct:bye")
         .post("/bye").to("mock:update");
 
 from("direct:hello")
         .transform().constant("Hello World");{code}
 

 

Those routes creates 3 netty consumers visible in JMX, consuming from following 
endpoints:
 * [http://0.0.0.0:0/say/bye?httpMethodRestrict=POST]
 * [http://0.0.0.0:0/say/bye?httpMethodRestrict=GET]
 * [http://0.0.0.0:0/say/hello?httpMethodRestrict=GET]

 

However, in JMX, I can see only 2 of those endpoints:

 
 * endpointBaseUri [http://0.0.0.0:0/say/bye], with endpointUri 
[http://0.0.0.0:0/say/bye?httpMethodRestrict=GET]
 * endpointBaseUri [http://0.0.0.0:0/say/hello], with endpointUri 
[http://0.0.0.0:0/say/hello?httpMethodRestrict=GET]

 

There is no endpoint for “POST” on “/bye”.

Maybe it’s because it would share the same endpointBaseUri than the endpoint 
for “GET” on “/bye” ?

 I attached a screenshot if this helps where we can see the 3 consumers and 
only 2 endpoints.

  !Capture.PNG!

Regards,

Nicolas


> camel rest and missing jmx endpoint
> -----------------------------------
>
>                 Key: CAMEL-15895
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15895
>             Project: Camel
>          Issue Type: Bug
>          Components: rest
>    Affects Versions: 3.6.0
>            Reporter: ncasaux
>            Priority: Minor
>         Attachments: Capture.PNG, Capture.PNG
>
>
> Hello,
>  I’m using some camel rest routes and found something unexpected with the 
> examples provided in [https://camel.apache.org/manual/latest/rest-dsl.html]
>  
> {code:java}
> rest("/say")
>          .get("/hello").to("direct:hello")
>          .get("/bye").consumes("application/json").to("direct:bye")
>          .post("/bye").to("mock:update");
>  
>  from("direct:hello")
>          .transform().constant("Hello World");{code}
>  
> Those routes creates 3 netty consumers visible in JMX, consuming from 
> following endpoints:
>  * [http://0.0.0.0:0/say/bye?httpMethodRestrict=POST]
>  * [http://0.0.0.0:0/say/bye?httpMethodRestrict=GET]
>  * [http://0.0.0.0:0/say/hello?httpMethodRestrict=GET]
>  However, in JMX, I can see only 2 of those endpoints: 
>  * endpointBaseUri [http://0.0.0.0:0/say/bye], with endpointUri 
> [http://0.0.0.0:0/say/bye?httpMethodRestrict=GET]
>  * endpointBaseUri [http://0.0.0.0:0/say/hello], with endpointUri 
> [http://0.0.0.0:0/say/hello?httpMethodRestrict=GET]
>  
> There is no endpoint for “POST” on “/bye”.
>  
> Maybe it’s because it would share the same endpointBaseUri than the endpoint 
> for “GET” on “/bye” ?
>  I attached a screenshot if this helps where we can see the 3 consumers and 
> only 2 endpoints.
>   !Capture.PNG!
> Regards,
> Nicolas



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to