You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "sameekbhaumik@yahoo.co.in" <sa...@yahoo.co.in> on 2017/04/13 16:24:45 UTC
Need Help: Using ServiceCall EIP and camel-ribbon component to
discover service from Netflix Eureka Server
Dear All,
I am trying to discover a service (localhost:9999) registered in a Eureka
Server running at localhost:8080 using ServiceCall EIP and camel-ribbon
component checked out from Github master branch i.e. 2.19.0-SNAPSHOT
version.
Following is my eureka-service properties used while registering the
service:
eureka.name=vertxHttp
eureka.vipAddress=http.vertx.net
eureka.port=9999
Now, my route to lookup the registered service is:
StaticServiceDiscovery servers = new StaticServiceDiscovery();
servers.addServer("localhost", 8080);
RibbonConfiguration configuration = new RibbonConfiguration();
RibbonLoadBalancer loadBalancer = new
RibbonLoadBalancer(configuration);
// configure camel service call
ServiceCallConfigurationDefinition config = new
ServiceCallConfigurationDefinition();
config.setLoadBalancer(loadBalancer);
config.setServiceDiscovery(servers);
// register configuration
getContext().setServiceCallConfiguration(config);
from("direct:start")
.serviceCall("vertxHttp","http:vertxHttp.host:vertxHttp.port")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
// TODO Auto-generated method stub
System.out.println("From Route->"+exchange);
}
})
.to("mock:result");
While running the above route in debug mode, the control is not going into
Processor.process, so I am unable to check the contents of exchange to see
whether ServiceCall is working as expected.
Couple of questions:
1) Can I use ServiceCall EIP and camel-ribbon component to discover a
service registered in Netflix Eureka Server?
2) If yes, pls help me in getting it working.
Thanks in advance.
Regards,
Sameek Bhaumik
--
View this message in context: http://camel.465427.n5.nabble.com/Need-Help-Using-ServiceCall-EIP-and-camel-ribbon-component-to-discover-service-from-Netflix-Eureka-Sr-tp5797647.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Need Help: Using ServiceCall EIP and camel-ribbon component to
discover service from Netflix Eureka Server
Posted by sameekbhaumik <sa...@yahoo.co.in>.
Developed my own Camel Component to discover a service registered in Netflix
Eureka Server
--
View this message in context: http://camel.465427.n5.nabble.com/Need-Help-Using-ServiceCall-EIP-and-camel-ribbon-component-to-discover-service-from-Netflix-Eureka-Sr-tp5797647p5799184.html
Sent from the Camel - Users mailing list archive at Nabble.com.