You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by CASAUX Nicolas <ni...@soprasteria.com> on 2020/11/07 07:54:22 UTC

camel rest and missing jmx endpoint

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

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

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.

Regards,
Nicolas


Re: camel rest and missing jmx endpoint

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Thanks, I will take a look.

Regards
JB

> Le 26 nov. 2020 à 10:08, CASAUX Nicolas <ni...@soprasteria.com> a écrit :
> 
> Hello,
> 
> I just created jira https://issues.apache.org/jira/browse/CAMEL-15895 about this.
> 
> Nicolas
> 
> De : CASAUX Nicolas <ni...@soprasteria.com>
> Envoyé : jeudi 26 novembre 2020 00:28
> À : users@camel.apache.org
> Objet : RE: camel rest and missing jmx endpoint
> 
> Hi Jean-Baptiste,
> 
> I just found out that your mail went to spam... 🙁
> 
> I will of course create a Jira and let you know.
> 
> Regards,
> Nicolas
> 
> ________________________________
> De : Jean-Baptiste Onofre <jb...@nanthrax.net>>
> Envoyé : lundi 9 novembre 2020 07:23
> À : users@camel.apache.org<ma...@camel.apache.org> <us...@camel.apache.org>>
> Objet : Re: camel rest and missing jmx endpoint
> 
> Hi Nicolas,
> 
> It sounds like a bug to me (maybe filtering only on URI and not the verb).
> 
> Can you please create a Jira I will take a look ?
> 
> Thanks,
> Regards
> JB
> 
>> Le 7 nov. 2020 à 08:54, CASAUX Nicolas <ni...@soprasteria.com>> a écrit :
>> 
>> Hello,
>> 
>> I’m using some camel rest routes and found something unexpected with the examples provided inhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamel.apache.org%2Fmanual%2Flatest%2Frest-dsl.html&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1r8t0yRmPV1tTj%2F310gbCiSeG%2FX2EzbwHvV2xMcf3o4%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamel.apache.org%2Fmanual%2Flatest%2Frest-dsl.html&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1r8t0yRmPV1tTj%2F310gbCiSeG%2FX2EzbwHvV2xMcf3o4%3D&amp;reserved=0>
>> 
>> 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");
>> 
>> Those routes creates 3 netty consumers visible in JMX, consuming from following endpoints:
>> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DPOST&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=FvOkg9ewG%2BkEAj9LqjpdGt0uzngWcOaSXrHZ1RJF7Ko%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DPOST&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=JgIFITv2cQOJYhPvK1wBGa9aJVoQESnJ9f4rb5TIY%2B4%3D&amp;reserved=0>
>> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0>
>> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0>
>> 
>> However, in JMX, I can see only 2 of those endpoints:
>> 
>> endpointBaseUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vuKvIrAsY7qZUOX%2FO5qengnYeY1J5hTn%2B%2FqktsMMYSY%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vuKvIrAsY7qZUOX%2FO5qengnYeY1J5hTn%2B%2FqktsMMYSY%3D&amp;reserved=0>, with endpointUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0>
>> endpointBaseUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WwDZ98svDx%2FrjmfwKgVrlHQa7zs79Wc83dV3PqZ9JK8%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WwDZ98svDx%2FrjmfwKgVrlHQa7zs79Wc83dV3PqZ9JK8%3D&amp;reserved=0>, with endpointUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0>
>> 
>> 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.
>> 
>> Regards,
>> Nicolas


RE: camel rest and missing jmx endpoint

Posted by CASAUX Nicolas <ni...@soprasteria.com>.
Hello,

I just created jira https://issues.apache.org/jira/browse/CAMEL-15895 about this.

Nicolas

De : CASAUX Nicolas <ni...@soprasteria.com>
Envoyé : jeudi 26 novembre 2020 00:28
À : users@camel.apache.org
Objet : RE: camel rest and missing jmx endpoint

Hi Jean-Baptiste,

I just found out that your mail went to spam... 🙁

I will of course create a Jira and let you know.

Regards,
Nicolas

________________________________
De : Jean-Baptiste Onofre <jb...@nanthrax.net>>
Envoyé : lundi 9 novembre 2020 07:23
À : users@camel.apache.org<ma...@camel.apache.org> <us...@camel.apache.org>>
Objet : Re: camel rest and missing jmx endpoint

Hi Nicolas,

It sounds like a bug to me (maybe filtering only on URI and not the verb).

Can you please create a Jira I will take a look ?

Thanks,
Regards
JB

> Le 7 nov. 2020 à 08:54, CASAUX Nicolas <ni...@soprasteria.com>> a écrit :
>
> Hello,
>
> I’m using some camel rest routes and found something unexpected with the examples provided inhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamel.apache.org%2Fmanual%2Flatest%2Frest-dsl.html&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1r8t0yRmPV1tTj%2F310gbCiSeG%2FX2EzbwHvV2xMcf3o4%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamel.apache.org%2Fmanual%2Flatest%2Frest-dsl.html&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1r8t0yRmPV1tTj%2F310gbCiSeG%2FX2EzbwHvV2xMcf3o4%3D&amp;reserved=0>
>
> 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");
>
> Those routes creates 3 netty consumers visible in JMX, consuming from following endpoints:
> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DPOST&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=FvOkg9ewG%2BkEAj9LqjpdGt0uzngWcOaSXrHZ1RJF7Ko%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DPOST&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=JgIFITv2cQOJYhPvK1wBGa9aJVoQESnJ9f4rb5TIY%2B4%3D&amp;reserved=0>
> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0>
> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0>
>
> However, in JMX, I can see only 2 of those endpoints:
>
> endpointBaseUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vuKvIrAsY7qZUOX%2FO5qengnYeY1J5hTn%2B%2FqktsMMYSY%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vuKvIrAsY7qZUOX%2FO5qengnYeY1J5hTn%2B%2FqktsMMYSY%3D&amp;reserved=0>, with endpointUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0>
> endpointBaseUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WwDZ98svDx%2FrjmfwKgVrlHQa7zs79Wc83dV3PqZ9JK8%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WwDZ98svDx%2FrjmfwKgVrlHQa7zs79Wc83dV3PqZ9JK8%3D&amp;reserved=0>, with endpointUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0>
>
> 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.
>
> Regards,
> Nicolas

RE: camel rest and missing jmx endpoint

Posted by CASAUX Nicolas <ni...@soprasteria.com>.
Hi Jean-Baptiste,

I just found out that your mail went to spam... 🙁

I will of course create a Jira and let you know.

Regards,
Nicolas

________________________________
De : Jean-Baptiste Onofre <jb...@nanthrax.net>
Envoyé : lundi 9 novembre 2020 07:23
À : users@camel.apache.org <us...@camel.apache.org>
Objet : Re: camel rest and missing jmx endpoint

Hi Nicolas,

It sounds like a bug to me (maybe filtering only on URI and not the verb).

Can you please create a Jira I will take a look ?

Thanks,
Regards
JB

> Le 7 nov. 2020 à 08:54, CASAUX Nicolas <ni...@soprasteria.com> a écrit :
>
> Hello,
>
> I’m using some camel rest routes and found something unexpected with the examples provided inhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamel.apache.org%2Fmanual%2Flatest%2Frest-dsl.html&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1r8t0yRmPV1tTj%2F310gbCiSeG%2FX2EzbwHvV2xMcf3o4%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamel.apache.org%2Fmanual%2Flatest%2Frest-dsl.html&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1r8t0yRmPV1tTj%2F310gbCiSeG%2FX2EzbwHvV2xMcf3o4%3D&amp;reserved=0>
>
> 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");
>
> Those routes creates 3 netty consumers visible in JMX, consuming from following endpoints:
> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DPOST&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286154390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=FvOkg9ewG%2BkEAj9LqjpdGt0uzngWcOaSXrHZ1RJF7Ko%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DPOST&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=JgIFITv2cQOJYhPvK1wBGa9aJVoQESnJ9f4rb5TIY%2B4%3D&amp;reserved=0>
> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0>
> ·         https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0>
>
> However, in JMX, I can see only 2 of those endpoints:
>
> endpointBaseUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vuKvIrAsY7qZUOX%2FO5qengnYeY1J5hTn%2B%2FqktsMMYSY%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vuKvIrAsY7qZUOX%2FO5qengnYeY1J5hTn%2B%2FqktsMMYSY%3D&amp;reserved=0>, with endpointUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fbye%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M8d2e1XJzjoJBhInW08RZYBfeaTGAPsjv33%2BWkyCKi0%3D&amp;reserved=0>
> endpointBaseUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WwDZ98svDx%2FrjmfwKgVrlHQa7zs79Wc83dV3PqZ9JK8%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WwDZ98svDx%2FrjmfwKgVrlHQa7zs79Wc83dV3PqZ9JK8%3D&amp;reserved=0>, with endpointUri https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0 <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F0.0.0.0%3A0%2Fsay%2Fhello%3FhttpMethodRestrict%3DGET&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C537570f450d542e614f708d884780426%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637404998286164385%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=TM9U5FP2biBSLku%2Bd9C2WeuWkPG%2BVtqyljGE0sg13kM%3D&amp;reserved=0>
>
> 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.
>
> Regards,
> Nicolas


Re: camel rest and missing jmx endpoint

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Nicolas,

It sounds like a bug to me (maybe filtering only on URI and not the verb).

Can you please create a Jira I will take a look ?

Thanks,
Regards
JB

> Le 7 nov. 2020 à 08:54, CASAUX Nicolas <ni...@soprasteria.com> a écrit :
> 
> Hello,
>  
> I’m using some camel rest routes and found something unexpected with the examples provided inhttps://camel.apache.org/manual/latest/rest-dsl.html <https://camel.apache.org/manual/latest/rest-dsl.html>
>  
> 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");
>  
> 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=POST>
> ·         http://0.0.0.0:0/say/bye?httpMethodRestrict=GET <http://0.0.0.0:0/say/bye?httpMethodRestrict=GET>
> ·         http://0.0.0.0:0/say/hello?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 <http://0.0.0.0:0/say/bye>, with endpointUri http://0.0.0.0:0/say/bye?httpMethodRestrict=GET <http://0.0.0.0:0/say/bye?httpMethodRestrict=GET>
> endpointBaseUri http://0.0.0.0:0/say/hello <http://0.0.0.0:0/say/hello>, with endpointUri http://0.0.0.0:0/say/hello?httpMethodRestrict=GET <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.
>  
> Regards,
> Nicolas