[jira] [Resolved] (CAMEL-12541) camel-cxfrs - rsClient does not work programmatically, only with XML

2018-05-30 Thread Willem Jiang (JIRA)


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

Willem Jiang resolved CAMEL-12541.
--
Resolution: Fixed

Merged the patches into master, camel-2.21.x and camel-2.20.x branches.

> camel-cxfrs - rsClient does not work programmatically, only with XML
> 
>
> Key: CAMEL-12541
> URL: https://issues.apache.org/jira/browse/CAMEL-12541
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1
>Reporter: Willian Antunes
>Assignee: Willian Antunes
>Priority: Major
> Fix For: 2.20.4, 2.21.2, 2.22.0
>
>
> As described in the documentation you can use [camel-cxfrs as 
> producer|https://github.com/apache/camel/blob/39c0d63d923bfe9236834ecb1c4470bb7e9e7eaa/components/camel-cxf/src/main/docs/cxfrs-component.adoc#how-to-configure-the-rest-endpoint-in-camel].
>  You have some approaches like using a proxy created from a interface which 
> maps all the services available in the targeted REST web service (sample 
> [here|https://github.com/willianantunes/honesto-sqn/blob/d4bf48257fc64a4725894c7f07c24bb1a516d410/src/main/java/br/com/willianantunes/serenata/JarbasAPI.java#L14]).
>  As I'm using Spring Boot and Apache Camel I may create a bean through XML or 
> programmatically.
> h4. Creating the test sample
> I'm testing with the following:
> [https://gist.github.com/willianantunes/58979bfb91ee30c7ff4e235940e60880]
> You can find a copy of JarbasAPI 
> [here|https://github.com/willianantunes/honesto-sqn/blob/d4bf48257fc64a4725894c7f07c24bb1a516d410/src/main/java/br/com/willianantunes/serenata/JarbasAPI.java#L14].
> h4. When rsClient producer works as expected
> When I do using the first approach using the configuration below everything 
> works fine:
> {code:xml}
> 
> http://www.springframework.org/schema/beans;
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>xmlns:cxf="http://camel.apache.org/schema/cxf;
>xmlns:jaxrs="http://cxf.apache.org/jaxrs;
>xmlns:util="http://www.springframework.org/schema/util;
>xsi:schemaLocation="
>http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
>http://www.springframework.org/schema/util 
> http://www.springframework.org/schema/util/spring-util.xsd
>http://camel.apache.org/schema/cxf 
> http://camel.apache.org/schema/cxf/camel-cxf.xsd
>http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
>http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd;>
>address="https://jarbas.serenata.ai; 
>   serviceClass="br.com.willianantunes.serenata.JarbasAPI"/>
> 
> {code}
> h4. When rsClient producer does not work as expected
> XML works fine, but when I do the same thing programmatically it doesn't.
> {code:java}
> @Bean("serviceEndpoint")
> public SpringJAXRSClientFactoryBean serviceEndpoint() {
> SpringJAXRSClientFactoryBean clientFactoryBean = new 
> SpringJAXRSClientFactoryBean();
> clientFactoryBean.setAddress("https://jarbas.serenata.ai;);
> clientFactoryBean.setServiceClass(JarbasAPI.class);
> return clientFactoryBean;
> }
> {code}
> Although it has no difference compared to XML, it does not work.
> h4. When does it fail?
> Debugging you can see the following:
>  * The bean is correctly got 
> [here|https://github.com/apache/camel/blob/a4cfea6823d31eacf57489e1ffeead9a256b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java#L76]
>  is CxfRsComponent.
>  * When a message is sent and there is a _to_ command with the URI 
> *cxfrs:bean:serviceEndpoint,* I see the message arriving 
> [here|https://github.com/apache/camel/blob/a4cfea6823d31eacf57489e1ffeead9a256b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java#L94]
>  in CxfRsProducer.
>  * The method 
> [invokeProxyClient|https://github.com/apache/camel/blob/a4cfea6823d31eacf57489e1ffeead9a256b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java#L103]
>  is called.
>  * The SpringJAXRSClientFactoryBean which I provided as bean is ignored. A 
> new one is created 
> [here|https://github.com/apache/camel/blob/834a59910e4b6b8d089e229b39f6c8673e7c3f9a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java#L414]
>  and when it arrives to the next line the method invoked is from 
> [CxfRsSpringEndpoint|https://github.com/apache/camel/blob/834a59910e4b6b8d089e229b39f6c8673e7c3f9a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java]
>  which uses 
> 

[jira] [Assigned] (CAMEL-12541) camel-cxfrs - rsClient does not work programmatically, only with XML

2018-05-30 Thread Willem Jiang (JIRA)


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

Willem Jiang reassigned CAMEL-12541:


Assignee: Willian Antunes

> camel-cxfrs - rsClient does not work programmatically, only with XML
> 
>
> Key: CAMEL-12541
> URL: https://issues.apache.org/jira/browse/CAMEL-12541
> Project: Camel
>  Issue Type: Bug
>  Components: camel-cxfrs
>Affects Versions: 2.21.1
>Reporter: Willian Antunes
>Assignee: Willian Antunes
>Priority: Major
> Fix For: 2.20.4, 2.21.2, 2.22.0
>
>
> As described in the documentation you can use [camel-cxfrs as 
> producer|https://github.com/apache/camel/blob/39c0d63d923bfe9236834ecb1c4470bb7e9e7eaa/components/camel-cxf/src/main/docs/cxfrs-component.adoc#how-to-configure-the-rest-endpoint-in-camel].
>  You have some approaches like using a proxy created from a interface which 
> maps all the services available in the targeted REST web service (sample 
> [here|https://github.com/willianantunes/honesto-sqn/blob/d4bf48257fc64a4725894c7f07c24bb1a516d410/src/main/java/br/com/willianantunes/serenata/JarbasAPI.java#L14]).
>  As I'm using Spring Boot and Apache Camel I may create a bean through XML or 
> programmatically.
> h4. Creating the test sample
> I'm testing with the following:
> [https://gist.github.com/willianantunes/58979bfb91ee30c7ff4e235940e60880]
> You can find a copy of JarbasAPI 
> [here|https://github.com/willianantunes/honesto-sqn/blob/d4bf48257fc64a4725894c7f07c24bb1a516d410/src/main/java/br/com/willianantunes/serenata/JarbasAPI.java#L14].
> h4. When rsClient producer works as expected
> When I do using the first approach using the configuration below everything 
> works fine:
> {code:xml}
> 
> http://www.springframework.org/schema/beans;
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>xmlns:cxf="http://camel.apache.org/schema/cxf;
>xmlns:jaxrs="http://cxf.apache.org/jaxrs;
>xmlns:util="http://www.springframework.org/schema/util;
>xsi:schemaLocation="
>http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
>http://www.springframework.org/schema/util 
> http://www.springframework.org/schema/util/spring-util.xsd
>http://camel.apache.org/schema/cxf 
> http://camel.apache.org/schema/cxf/camel-cxf.xsd
>http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
>http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd;>
>address="https://jarbas.serenata.ai; 
>   serviceClass="br.com.willianantunes.serenata.JarbasAPI"/>
> 
> {code}
> h4. When rsClient producer does not work as expected
> XML works fine, but when I do the same thing programmatically it doesn't.
> {code:java}
> @Bean("serviceEndpoint")
> public SpringJAXRSClientFactoryBean serviceEndpoint() {
> SpringJAXRSClientFactoryBean clientFactoryBean = new 
> SpringJAXRSClientFactoryBean();
> clientFactoryBean.setAddress("https://jarbas.serenata.ai;);
> clientFactoryBean.setServiceClass(JarbasAPI.class);
> return clientFactoryBean;
> }
> {code}
> Although it has no difference compared to XML, it does not work.
> h4. When does it fail?
> Debugging you can see the following:
>  * The bean is correctly got 
> [here|https://github.com/apache/camel/blob/a4cfea6823d31eacf57489e1ffeead9a256b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java#L76]
>  is CxfRsComponent.
>  * When a message is sent and there is a _to_ command with the URI 
> *cxfrs:bean:serviceEndpoint,* I see the message arriving 
> [here|https://github.com/apache/camel/blob/a4cfea6823d31eacf57489e1ffeead9a256b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java#L94]
>  in CxfRsProducer.
>  * The method 
> [invokeProxyClient|https://github.com/apache/camel/blob/a4cfea6823d31eacf57489e1ffeead9a256b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java#L103]
>  is called.
>  * The SpringJAXRSClientFactoryBean which I provided as bean is ignored. A 
> new one is created 
> [here|https://github.com/apache/camel/blob/834a59910e4b6b8d089e229b39f6c8673e7c3f9a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java#L414]
>  and when it arrives to the next line the method invoked is from 
> [CxfRsSpringEndpoint|https://github.com/apache/camel/blob/834a59910e4b6b8d089e229b39f6c8673e7c3f9a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java]
>  which uses 
> 

[jira] [Resolved] (CAMEL-12360) Add logRetryAttemptedInterval to RedeliveryPolicy

2018-05-30 Thread Quinn Stevenson (JIRA)


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

Quinn Stevenson resolved CAMEL-12360.
-
Resolution: Fixed

Backported to 2.20.4 with commit 7ff38a225a2de0f3b87ac5cbcfaab0a5648b3378

> Add logRetryAttemptedInterval to RedeliveryPolicy
> -
>
> Key: CAMEL-12360
> URL: https://issues.apache.org/jira/browse/CAMEL-12360
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Minor
> Fix For: 2.20.4, 2.21.2, 2.22.0
>
>
> A logRetryAttemptedInterval configuration property will be added to the 
> RedeliveryPolicy to provide a little more control over how much information 
> winds up the logs when Camel is attempting to redeliver an exchange.
> When this option is set to a value greater than zero and logRetryAttempted is 
> true, the retry attempt will be logged for the first attempt and then every 
> Nth attempt after the first attempt - reducing the number of log entries for 
> this.



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


[jira] [Commented] (CAMEL-12360) Add logRetryAttemptedInterval to RedeliveryPolicy

2018-05-30 Thread Quinn Stevenson (JIRA)


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

Quinn Stevenson commented on CAMEL-12360:
-

Backported to 2.21.2 with commit 347f8b15d94839ba2eacb51050a5bd016ecdba11

> Add logRetryAttemptedInterval to RedeliveryPolicy
> -
>
> Key: CAMEL-12360
> URL: https://issues.apache.org/jira/browse/CAMEL-12360
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Minor
> Fix For: 2.20.4, 2.21.2, 2.22.0
>
>
> A logRetryAttemptedInterval configuration property will be added to the 
> RedeliveryPolicy to provide a little more control over how much information 
> winds up the logs when Camel is attempting to redeliver an exchange.
> When this option is set to a value greater than zero and logRetryAttempted is 
> true, the retry attempt will be logged for the first attempt and then every 
> Nth attempt after the first attempt - reducing the number of log entries for 
> this.



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


[jira] [Updated] (CAMEL-12360) Add logRetryAttemptedInterval to RedeliveryPolicy

2018-05-30 Thread Quinn Stevenson (JIRA)


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

Quinn Stevenson updated CAMEL-12360:

Fix Version/s: 2.21.2
   2.20.4

> Add logRetryAttemptedInterval to RedeliveryPolicy
> -
>
> Key: CAMEL-12360
> URL: https://issues.apache.org/jira/browse/CAMEL-12360
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Minor
> Fix For: 2.20.4, 2.21.2, 2.22.0
>
>
> A logRetryAttemptedInterval configuration property will be added to the 
> RedeliveryPolicy to provide a little more control over how much information 
> winds up the logs when Camel is attempting to redeliver an exchange.
> When this option is set to a value greater than zero and logRetryAttempted is 
> true, the retry attempt will be logged for the first attempt and then every 
> Nth attempt after the first attempt - reducing the number of log entries for 
> this.



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


[jira] [Reopened] (CAMEL-12360) Add logRetryAttemptedInterval to RedeliveryPolicy

2018-05-30 Thread Quinn Stevenson (JIRA)


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

Quinn Stevenson reopened CAMEL-12360:
-

Backporting to supported versions

> Add logRetryAttemptedInterval to RedeliveryPolicy
> -
>
> Key: CAMEL-12360
> URL: https://issues.apache.org/jira/browse/CAMEL-12360
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Quinn Stevenson
>Assignee: Quinn Stevenson
>Priority: Minor
> Fix For: 2.22.0
>
>
> A logRetryAttemptedInterval configuration property will be added to the 
> RedeliveryPolicy to provide a little more control over how much information 
> winds up the logs when Camel is attempting to redeliver an exchange.
> When this option is set to a value greater than zero and logRetryAttempted is 
> true, the retry attempt will be logged for the first attempt and then every 
> Nth attempt after the first attempt - reducing the number of log entries for 
> this.



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


[jira] [Created] (CAMEL-12547) Create a camel-google-mail-stream component

2018-05-30 Thread Andrea Cosentino (JIRA)
Andrea Cosentino created CAMEL-12547:


 Summary: Create a camel-google-mail-stream component
 Key: CAMEL-12547
 URL: https://issues.apache.org/jira/browse/CAMEL-12547
 Project: Camel
  Issue Type: Improvement
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
 Fix For: Future


We can create a stream component only with consumer features, to consume email 
from google mail API, by specifying labels, maxResults etc.

Maybe we can use also pubsub for this.

[https://developers.google.com/gmail/api/guides/push]

[~zregv...@gmail.com] [~nferraro] [~lb] [~janstey]

Lets discuss here.



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


[jira] [Resolved] (CAMEL-10793) camel cloud: expose routes as a service

2018-05-30 Thread Luca Burgazzoli (JIRA)


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

Luca Burgazzoli resolved CAMEL-10793.
-
Resolution: Fixed

> camel cloud: expose routes as a service
> ---
>
> Key: CAMEL-10793
> URL: https://issues.apache.org/jira/browse/CAMEL-10793
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
>  Labels: cloud
> Fix For: 2.22.0
>
>
> As today we have a ServiceCall EIP that makes it easy to call external 
> services in a cloud environment leveraging external service registry such as 
> kubernetes, consul, etcd, spring-cloud & co so It could make sense to add a 
> way for a route to register itself in such registries and be available as a 
> service for other to consume.
> Something like:
> {code:java}
> // programmatic config
> from("jetty:http://0.0.0.0:8001/service1;)
> .serviceRegistry()
> .name("service-1")
> .host("")
> .port(8001)
> .meta("camel.protocol", "http")
> .meta("camel.component", "jetty")
> .meta("camel.context.path", "/service1")
> .end()
> .to("direct:service-1")
> // Inherit from a global config and eventually override it
> from("jetty:http://0.0.0.0:8002/service2;)
>   .serviceRegistry("service-2")
>   .configRef("service-registry-conf")
>   .port(8002)
>   .to("direct:service-2")
> // Smart auto configuration
> //   i.e. if the endpoint implements DiscoverableService
> from("jetty:http://0.0.0.0:8003/service3;)
>   .serviceRegistry("service-3")
>   .to("direct:service-3")
> {code}
> Beside making camel play better in cloud environment,  you can use the 
> service call to connect camel based micro services with minimal configuration 
> as the registration may provide some additional meta data that the service 
> call can use for auto-configuration (of course not all the registries can do 
> it).
> The future Health  API/Service may then also be configured to remove or 
> invalidate the service if the route is reported as not healthy.



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


[jira] [Resolved] (CAMEL-12505) service-call : include ServiceDefinition metatdata when computing the final URI

2018-05-30 Thread Luca Burgazzoli (JIRA)


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

Luca Burgazzoli resolved CAMEL-12505.
-
Resolution: Fixed

> service-call : include ServiceDefinition metatdata when computing the final 
> URI
> ---
>
> Key: CAMEL-12505
> URL: https://issues.apache.org/jira/browse/CAMEL-12505
> Project: Camel
>  Issue Type: Test
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
>  Labels: cloud, service-call
> Fix For: 2.22.0
>
>
> A ServiceDefinition may include info such as the context path of an http 
> request so we need to take ServiceDefinition meta data into account when 
> computing the final URI



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


[jira] [Resolved] (CAMEL-12518) camel cloud : leverage spring-cloud ServiceRegistry to register routes

2018-05-30 Thread Luca Burgazzoli (JIRA)


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

Luca Burgazzoli resolved CAMEL-12518.
-
Resolution: Fixed

> camel cloud : leverage spring-cloud ServiceRegistry to register routes
> --
>
> Key: CAMEL-12518
> URL: https://issues.apache.org/jira/browse/CAMEL-12518
> Project: Camel
>  Issue Type: Sub-task
>  Components: camel-spring-cloud
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
>  Labels: cloud
> Fix For: 2.22.0
>
>




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


[jira] [Resolved] (CAMEL-12531) camel cloud : create a spring cloud based camel-service example

2018-05-30 Thread Luca Burgazzoli (JIRA)


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

Luca Burgazzoli resolved CAMEL-12531.
-
Resolution: Fixed

> camel cloud : create a spring cloud based camel-service example 
> 
>
> Key: CAMEL-12531
> URL: https://issues.apache.org/jira/browse/CAMEL-12531
> Project: Camel
>  Issue Type: Sub-task
>  Components: examples
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
>  Labels: cloud
> Fix For: 2.22.0
>
>




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


[jira] [Resolved] (CAMEL-12502) camel cloud : create a service registration route policy

2018-05-30 Thread Luca Burgazzoli (JIRA)


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

Luca Burgazzoli resolved CAMEL-12502.
-
Resolution: Fixed

> camel cloud : create a service registration route policy
> 
>
> Key: CAMEL-12502
> URL: https://issues.apache.org/jira/browse/CAMEL-12502
> Project: Camel
>  Issue Type: Sub-task
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
>  Labels: cloud
> Fix For: 2.22.0
>
>




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


[jira] [Resolved] (CAMEL-12485) camel cloud : create camel-service component

2018-05-30 Thread Luca Burgazzoli (JIRA)


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

Luca Burgazzoli resolved CAMEL-12485.
-
Resolution: Fixed

> camel cloud : create camel-service component
> 
>
> Key: CAMEL-12485
> URL: https://issues.apache.org/jira/browse/CAMEL-12485
> Project: Camel
>  Issue Type: Sub-task
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
>  Labels: cloud
> Fix For: 2.22.0
>
>
> We should create a camel-service component that like the camel-master 
> component leverage a service to expose routes for discovery on consumer side 
> and leverage Service Call EIP on producer side to invoke a service.
> Some thing like:
> {code:java}
> 
> from("service:jetty:0.0.0.0:8081/exposedService?serviceRegistry=#myRegistry")
> .to("service:targetService?serviceDiscovery=#mydiscovery");
> {code}



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


[jira] [Commented] (CAMEL-10793) camel cloud: expose routes as a service

2018-05-30 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-10793:


Github user lburgazzoli closed the pull request at:

https://github.com/apache/camel/pull/2353


> camel cloud: expose routes as a service
> ---
>
> Key: CAMEL-10793
> URL: https://issues.apache.org/jira/browse/CAMEL-10793
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
>  Labels: cloud
> Fix For: 2.22.0
>
>
> As today we have a ServiceCall EIP that makes it easy to call external 
> services in a cloud environment leveraging external service registry such as 
> kubernetes, consul, etcd, spring-cloud & co so It could make sense to add a 
> way for a route to register itself in such registries and be available as a 
> service for other to consume.
> Something like:
> {code:java}
> // programmatic config
> from("jetty:http://0.0.0.0:8001/service1;)
> .serviceRegistry()
> .name("service-1")
> .host("")
> .port(8001)
> .meta("camel.protocol", "http")
> .meta("camel.component", "jetty")
> .meta("camel.context.path", "/service1")
> .end()
> .to("direct:service-1")
> // Inherit from a global config and eventually override it
> from("jetty:http://0.0.0.0:8002/service2;)
>   .serviceRegistry("service-2")
>   .configRef("service-registry-conf")
>   .port(8002)
>   .to("direct:service-2")
> // Smart auto configuration
> //   i.e. if the endpoint implements DiscoverableService
> from("jetty:http://0.0.0.0:8003/service3;)
>   .serviceRegistry("service-3")
>   .to("direct:service-3")
> {code}
> Beside making camel play better in cloud environment,  you can use the 
> service call to connect camel based micro services with minimal configuration 
> as the registration may provide some additional meta data that the service 
> call can use for auto-configuration (of course not all the registries can do 
> it).
> The future Health  API/Service may then also be configured to remove or 
> invalidate the service if the route is reported as not healthy.



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


[jira] [Created] (CAMEL-12546) rest-dsl - Allow to configure rest configuration via spring boot auto configuration

2018-05-30 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-12546:
---

 Summary: rest-dsl - Allow to configure rest configuration via 
spring boot auto configuration
 Key: CAMEL-12546
 URL: https://issues.apache.org/jira/browse/CAMEL-12546
 Project: Camel
  Issue Type: Improvement
  Components: camel-spring-boot, rest
Reporter: Claus Ibsen
 Fix For: 2.23.0


There are some global configurations you can configure on restConfiguration. We 
should make it possible to configure these via spring boot auto configuration, 
eg application.properties etc.



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


[jira] [Commented] (CAMEL-11162) camel-rest - Should we add content-type check for server side

2018-05-30 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-11162:


GitHub user davsclaus opened a pull request:

https://github.com/apache/camel/pull/2354

CAMEL-11162: rest-dsl add client request validation

So we check whether required data is included in the client http request 
when being processed by rest-dsl consumer. 

We now check for missing
- query parameters
- http headers
- body

The context-path is already handled in the uri path matcher, so it will 
fail already for invalid context-path.

This can be turned on in the rest configuration. 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/camel rest-val

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2354.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2354


commit 8f088e7fa1fb11e48ed4150ad460bad1d4dd1020
Author: Claus Ibsen 
Date:   2018-05-29T14:38:28Z

CAMEL-11162: rest-dsl now has validation check for consumer to check if the 
http client request has content-type/accept headers that is supported in 
rest-dsl consumes/produces settings.

commit c9ff0ce02d9d7ed72e84b5fb58a19d7820822300
Author: Claus Ibsen 
Date:   2018-05-30T06:45:56Z

CAMEL-11162: rest-dsl now has validation check for consumer to check if the 
http client request has content-type/accept headers that is supported in 
rest-dsl consumes/produces settings.

commit 066566dea22ed6dcc2978ca33b0707a6d0035f7f
Author: Claus Ibsen 
Date:   2018-05-30T09:03:49Z

CAMEL-11162: rest-dsl now has validation check for consumer to check if the 
http client request has content-type/accept headers that is supported in 
rest-dsl consumes/produces settings.




> camel-rest - Should we add content-type check for server side
> -
>
> Key: CAMEL-11162
> URL: https://issues.apache.org/jira/browse/CAMEL-11162
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.22.0
>
>
> For example setting up a rest-dsl which consumes application/json and then a 
> client calls it with text/plain or application/xml, should we then automatic 
> let rest consumer detect this and return a HTTP status 415 (unsuported media 
> type)
> Not all the HTTP server components does this today, eg jetty etc. But when 
> using restlet which is more natual REST it would do so.
> We could then add an option to turn this on|off. 
> The check is only if the media-type is within the list that may have been 
> specified on consumes in the rest-dsl.



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


[jira] [Commented] (CAMEL-11162) camel-rest - Should we add content-type check for server side

2018-05-30 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on CAMEL-11162:


davsclaus opened a new pull request #2354: CAMEL-11162: rest-dsl add client 
request validation
URL: https://github.com/apache/camel/pull/2354
 
 
   So we check whether required data is included in the client http request 
when being processed by rest-dsl consumer. 
   
   We now check for missing
   - query parameters
   - http headers
   - body
   
   The context-path is already handled in the uri path matcher, so it will fail 
already for invalid context-path.
   
   This can be turned on in the rest configuration. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> camel-rest - Should we add content-type check for server side
> -
>
> Key: CAMEL-11162
> URL: https://issues.apache.org/jira/browse/CAMEL-11162
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.22.0
>
>
> For example setting up a rest-dsl which consumes application/json and then a 
> client calls it with text/plain or application/xml, should we then automatic 
> let rest consumer detect this and return a HTTP status 415 (unsuported media 
> type)
> Not all the HTTP server components does this today, eg jetty etc. But when 
> using restlet which is more natual REST it would do so.
> We could then add an option to turn this on|off. 
> The check is only if the media-type is within the list that may have been 
> specified on consumes in the rest-dsl.



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