2 Replies Latest reply on Nov 17, 2012 2:57 AM by davsclaus

    Accessing camel routes in fabric from outside fabric

    spandit2

      Folks I am sure you all must have faced this problem .

       

       

      I have a Camel route which is calling another service .  In this route I have

       

      From(jetty:http://0.0.0.0:8181/myroute)

       

      to(jetty:http://0.0.0.0:8181/myservice)

       

      We can access this camel route from outside by visiting http://hostname:8181/myroute .

      Everything works as expected .

       

      Now we want to deploy this in fabric . I understand that to make this end point available in fabric , I will have to change it to

       

      from("fabric:myName:jetty:http://0.0.0.0:{$portnumber}/myroute").

       

      My question is how do I access this route from outside fabric ?. What URL can I use so that I benefit from load balancing ?

       

      Are there any examples demonstrating this ?

       

      Appreciate any insights on this .

       

      Regards

      Sunil Pandit

        • 1. Re: Accessing camel routes in fabric from outside fabric
          yngve2

          It would be realy nice if there existed an Apache HTTP Server Plugin for http based camel endpoints.

           

          In httpd.conf it could look something like this:

           

          LoadModule fusefabric_module mod_fusefabric.so

          ..

           

          • 2. Re: Accessing camel routes in fabric from outside fabric
            davsclaus

            From outside fabric you can access this service using the IP of the node, eg just like before. Eg if you run on the same node, then you can use "localhost" etc.

             

            The load balancing that fabric offers is on the client side when you use fabric on the client also.

            When you do that, you just refer to the fabric logical name (eg "fabric:myName") and then fabric will do the resolution of the actual endpoint and do the load balancing.