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
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
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
You can open the Consul web console
http://localhost:8500/ui
Where you can find information about the services and its state.
If you hit any problem using Camel or have some feedback, then please let us know.
We also love contributors, so get involved :-)
The Camel riders!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。