[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] [Commented] (CAMEL-10793) camel cloud: expose routes as a service

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


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

ASF GitHub Bot commented on CAMEL-10793:


GitHub user lburgazzoli opened a pull request:

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

camel service registry

This PR is the initial work to ease the process to expose routes as 
services [CAMEL-10793](https://issues.apache.org/jira/browse/CAMEL-10793).

A simple example is:

```java
from("service:my-service:undertow:http://0.0.0.0:8080/the/context/path;)
.log("Route ${routeId} has been invoked");
```

As undertow component, supports service registration, this endpoint will be 
registered to a given Service Registry (we now have a binding for consul, 
zookeeper and spring-cloud) as `my-service` along with some metadata such as 
the protocol and the context path. This allow to invoke the service on another 
jvm instance by name, like:

```java
from("direct:call")
.serviceCall("my-service")
```

**NOTE**: The implementation is not yet complete so you still need to do 
some manual configuration and the number of supported component that support 
service registration is limited to those extending `camel-http-common` and 
`undertow`  .
**NOTE**: integration with spring-cloud is not as easy as it should be so I 
had to introduce two new modules: camel-spring-cloud-zookeeper and 
camel-spring-cloud-consul.

Any feedback would be really appreciated.

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

$ git pull https://github.com/lburgazzoli/apache-camel CAMEL-12485-pr

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

https://github.com/apache/camel/pull/2353.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 #2353


commit c927df33aca97744ede41b76e726d4ecef8d3563
Author: lburgazzoli 
Date:   2018-05-29T15:08:00Z

CAMEL-12485: camel cloud : create camel-service component

commit 349639992a22a5c67978c3620ac2af0f003c1d86
Author: lburgazzoli 
Date:   2018-05-10T16:33:38Z

CAMEL-12502: camel cloud : create a service route policy

commit 95dbeb2794d23538a218a275896a51ad723db550
Author: lburgazzoli 
Date:   2018-05-10T20:31:49Z

CAMEL-12485: camel cloud : create camel-service component

commit dfb11b311717cf25068728703ce1542af087cd69
Author: lburgazzoli 
Date:   2018-05-11T10:33:33Z

CAMEL-12505: service-call : include ServiceDefinition metatdata when 
computing the final URI

commit 8f5486d5e8920daa2d80367a0148c6f4aec5f059
Author: lburgazzoli 
Date:   2018-05-14T12:49:37Z

CAMEL-12485: camel cloud : create camel-service component

commit 3e368ca037bc243a8d6678bfcd734f485e8c319c
Author: lburgazzoli 
Date:   2018-05-15T13:06:54Z

fix consul kv test

commit c08e704a29954c41d2a13c690424df68bd951ce3
Author: lburgazzoli 
Date:   2018-05-17T15:02:40Z

CAMEL-12518: camel cloud : leverage spring-cloud ServiceRegistry to 
register routes

commit 4988f0c4ff40f83c6d9fe18f1b6d5be6a3a17ad4
Author: lburgazzoli 
Date:   2018-05-23T10:57:51Z

CAMEL-12502: camel cloud : create a service route policy

commit ea88ec23da3e9e886e2cdbbe87992615c11b6c6d
Author: lburgazzoli 
Date:   2018-05-23T14:35:40Z

CAMEL-12531: camel cloud : create a spring cloud based camel-service example

commit 5ec6c5ed1f10c369e23296aba2671577fb2d3334
Author: lburgazzoli 
Date:   2018-05-23T18:23:40Z

CAMEL-12518: camel cloud : leverage spring-cloud ServiceRegistry to 
register routes

commit 086bdfff5fa13e58976f6a77b5b0ef3e05769046
Author: lburgazzoli 
Date:   2018-05-23T18:25:12Z

CAMEL-12531: camel cloud : create a spring cloud based camel-service example

commit bbc6e5fc7fe686d37ee085bd4600dfd1166c28b2
Author: lburgazzoli 
Date:   2018-05-24T13:16:08Z

CAMEL-12518: camel cloud : leverage spring-cloud ServiceRegistry to 
register routes

commit b02d2da88b9459149dcedd1f37d83f5c63eef70b
Author: lburgazzoli 
Date:   2018-05-28T11:38:55Z

CAMEL-12502: camel cloud : create a service route policy

commit b412b6282298fe03e9bf80d4cccae675130a27a5
Author: lburgazzoli 
Date:   2018-05-28T13:00:08Z

CAMEL-12502: camel cloud : create a service route policy

commit 2adbaab0ebda6a5c6a27dbd2ccd29ec558b09ab3
Author: lburgazzoli 
Date:   2018-05-28T13:03:57Z

CAMEL-12502: camel cloud : create a service route policy

commit 14666bfe1b3d81458aee1cf383b7262a513c61e8
Author: lburgazzoli 
Date:   2018-05-28T14:08:27Z

service registry doc

commit c09d5fc8ce116fe11d0726cd1839688d9eaf3103
Author: lburgazzoli 
Date:   2018-05-29T14:48:19Z

service registry

commit 67a86f57424b976053d86f316b64d44e27437b51
Author: lburgazzoli 
Date:   2018-05-29T15:14:24Z

fix typos

commit 2a7e54e9fea7d8e00d8e104a3b14d3756e33a6dc
Author: lburgazzoli 

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

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


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

ASF GitHub Bot commented on CAMEL-10793:


Github user lburgazzoli closed the pull request at:

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


> 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] [Commented] (CAMEL-10793) camel cloud: expose routes as a service

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


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

ASF GitHub Bot commented on CAMEL-10793:


GitHub user lburgazzoli opened a pull request:

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

camel service registry

This PR is the initial work to ease the process to expose routes as 
services [CAMEL-10793](https://issues.apache.org/jira/browse/CAMEL-10793).

A simple example is:

```java
from("service:my-service:undertow:http://0.0.0.0:8080/the/context/path;)
.log("Route ${routeId} has been invoked");
```

As undertow component, supports service registration, this endpoint will be 
registered to a given Service Registry (we now have a binding for consul, 
zookeeper and spring-cloud) as `my-service` along with some metadata such as 
the protocol and the context path. This allow to invoke the service on another 
jvm instance by name, like:

```java
from("direct:call")
.serviceCall("my-service")
```

**NOTE**: The implementation is not yet complete so you still need to do 
some manual configuration and the number of supported component that support 
service registration is limited to those extending `camel-http-common` and 
`undertow`  .
**NOTE**: integration with spring-cloud is not as easy as it should be so I 
had to introduce two new modules: camel-spring-cloud-zookeeper and 
camel-spring-cloud-consul.

Any feedback would be really appreciated.

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

$ git pull https://github.com/lburgazzoli/apache-camel CAMEL-12485

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

https://github.com/apache/camel/pull/2352.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 #2352


commit 8959683c39d8d8ff368c91fd2362dc149149cbd3
Author: lburgazzoli 
Date:   2018-05-07T17:00:52Z

CAMEL-12485: camel cloud : create camel-service component

commit cbdb3b64c1c79886d17337517f498fb7804f5fed
Author: lburgazzoli 
Date:   2018-05-10T16:33:38Z

CAMEL-12502: camel cloud : create a service route policy

commit 07594d2fa19d8987eca783a2a7afab70846094b0
Author: lburgazzoli 
Date:   2018-05-10T20:31:49Z

CAMEL-12485: camel cloud : create camel-service component

commit 54b1405759298991a116502a6e60d203f3e91965
Author: lburgazzoli 
Date:   2018-05-11T10:33:33Z

CAMEL-12505: service-call : include ServiceDefinition metatdata when 
computing the final URI

commit 4468cc1e54f0fc2314d34b0172d06c5548de4bc4
Author: lburgazzoli 
Date:   2018-05-14T12:49:37Z

CAMEL-12485: camel cloud : create camel-service component

commit bb9e10539ff0cdcc26539981534bdf39205b760e
Author: lburgazzoli 
Date:   2018-05-15T13:06:54Z

fix consul kv test

commit e62ffebe643eef2897cd393a37a1a7aa4248ca94
Author: lburgazzoli 
Date:   2018-05-17T15:02:40Z

CAMEL-12518: camel cloud : leverage spring-cloud ServiceRegistry to 
register routes

commit e10065dcf25a0ae61a2eeeaa2c20157c577945f3
Author: lburgazzoli 
Date:   2018-05-23T10:57:51Z

CAMEL-12502: camel cloud : create a service route policy

commit 5079e5335a8ee0a92fa70c4f1ff29006c2d51165
Author: lburgazzoli 
Date:   2018-05-23T14:35:40Z

CAMEL-12531: camel cloud : create a spring cloud based camel-service example

commit 51ed886d139a11e9d83e57d8d3806fdbccd92f5f
Author: lburgazzoli 
Date:   2018-05-23T18:23:40Z

CAMEL-12518: camel cloud : leverage spring-cloud ServiceRegistry to 
register routes

commit a887bbe8b07871e2f7713e6a89f2febcf4707f33
Author: lburgazzoli 
Date:   2018-05-23T18:25:12Z

CAMEL-12531: camel cloud : create a spring cloud based camel-service example

commit ad6e928bd388070020793f9c6bc72c04758a
Author: lburgazzoli 
Date:   2018-05-24T13:16:08Z

CAMEL-12518: camel cloud : leverage spring-cloud ServiceRegistry to 
register routes

commit 2611407c6f996a010aa5ca240c21652b45502c82
Author: lburgazzoli 
Date:   2018-05-28T11:38:55Z

CAMEL-12502: camel cloud : create a service route policy

commit aaceeea8250b928fb870408cc7c3aab13e9d7a08
Author: lburgazzoli 
Date:   2018-05-28T13:00:08Z

CAMEL-12502: camel cloud : create a service route policy

commit 1b655e17a7d01f8083b5cd2d76b837d279ded4bb
Author: lburgazzoli 
Date:   2018-05-28T13:03:57Z

CAMEL-12502: camel cloud : create a service route policy

commit fee9b5c3b95c741526e0c768270ce0f9a0695679
Author: lburgazzoli 
Date:   2018-05-28T14:08:27Z

service registry doc




> 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
>   

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

2018-04-27 Thread Luca Burgazzoli (JIRA)

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

Luca Burgazzoli commented on CAMEL-10793:
-

service component may be also useful to clearly state which route should be 
exposed and what not 

> 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: Major
>  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] [Commented] (CAMEL-10793) camel cloud: expose routes as a service

2018-04-27 Thread Willem Jiang (JIRA)

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

Willem Jiang commented on CAMEL-10793:
--

+1 for the DiscoverableService interface, and we may need a common solution for 
look up the address like 0.0.0.0. 
Now I'm think if we can use some annotation (with the aspect advise) in the 
Route to minimize the configuration (we don't even need to create the service 
component for wrapping the service).


> 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: Major
>  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] [Commented] (CAMEL-10793) camel cloud: expose routes as a service

2018-04-27 Thread Luca Burgazzoli (JIRA)

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

Luca Burgazzoli commented on CAMEL-10793:
-

Maybe we can introduce something like RegistrationConfiguration so one van use 
it as ref like:

  from(“service:...?serviceId=myservice=#myConfig”)

So we can have a global/sharable config that the service component can 
eventually override using uri options. 

Let me work on a POC next week.


> 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: Major
>  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] [Commented] (CAMEL-10793) camel cloud: expose routes as a service

2018-04-26 Thread Luca Burgazzoli (JIRA)

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

Luca Burgazzoli commented on CAMEL-10793:
-

I think it could work too. 

The rationale behind the DSL is that I may not want to expose the full URI but 
only the options that are needed to contact the service, i.e. for http bases 
services we don't need to expose the implementation (jetty, undertow) but only 
the protocol (http/s)  so the service component would work nice with 
endpoints/consumenrs that implements an interface like DiscoverableService

> 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: Major
>  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] [Commented] (CAMEL-10793) camel cloud: expose routes as a service

2018-04-26 Thread Willem Jiang (JIRA)

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

Willem Jiang commented on CAMEL-10793:
--

How about we introduce another service registry component which can wrap the 
old components?
{code} from("service:jetty:http://0.0.0.0:8001/service1?servicename= jetty1") 
{code}
We may need to update camel API to expose the consumer endpoint address to the 
registry.
BTW, the registry setting could be a part of camel context.
  
Any thought?

> 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: Major
>  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] [Commented] (CAMEL-10793) camel cloud: expose routes as a service

2017-09-08 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-10793:
-

I suggest to move this to 2.21

> 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
> Fix For: 2.20.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 & co so It could maje 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
> 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
(v6.4.14#64029)