== Spring Cloud and ServiceCall EIP Example

This example show how to use Camel with Service Registry, spring-cloud and consul.

This example includes two maven modules:

 - service that exposes a number of services
 - consumer that consumes services

=== Configuration

The consumer is configured in the src/main/resources/application.properties

=== Build

You can build this example using

    mvn compile

=== Run the example

Using multiple shells:

 - start consul:

  docker run --rm -ti --publish 8500:8500 \
    consul:1.6.1 \
        agent \
            -dev \
            -server \
            -ui \
            -bootstrap \
            -datacenter camel \
            -client 0.0.0.0 \
            -log-level trace

 - start the service:

  $ cd service
  $ mvn spring-boot:run

- start the consumer

  $ cd consumer
  $ mvn spring-boot:run

=== Test the example:

In a new shell:

  $ curl localhost:8080/camel/serviceCall
  Hi!, I'm service-1 on path: /path/to/service/1
  $ curl localhost:8080/camel/serviceCall
  Hi!, I'm service-1 on path: /path/to/service/2

=== Web console

You can open the Consul web console

     http://localhost:8500/ui

Where you can find information about the services and its state.

=== Help and contributions

If you hit any problem using Camel or have some feedback, then please
https://camel.apache.org/support.html[let us know].

We also love contributors, so
https://camel.apache.org/contributing.html[get involved] :-)

The Camel riders!
