jmuel/Carfax-Camel-Demo — pull request #1 by aaronfreeman (2014-07-25 21:30:26+00:00)
Title: adding routing stuff

I've added the stuff in to do service routing. The RouteReader class just reads in the services that are defined in the routes file and creates camel routes out of them. I also added a Test class that just testing hitting the endpoints through Camel and directly to see how the times compare. Oddly enough, it's always faster when I access it through Camel. I'm not sure why. I'm using netty instead of jetty since netty is just HTTP and jetty is a full servlet container which we don't really need.

The router requires you to set a 'caller' and 'service' header so it knows where to send the request. In the route file you can set the endpoint based on the environment and on the caller to the service. The only thing I need to add to it now would be error handling so it can alert when a service is down.