You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by MLVJ <ml...@yahoo.co.uk.INVALID> on 2017/08/31 08:25:57 UTC

Content Based Routing Feasibility Q

I have a problem, and I think that Camel can solve it, but I would like to be sure!
What I want to do is to write a generic handler, to catch web service requests, look in the header, at the "USER", then identify a preferred destination for that user according to a regularly-refreshed cache, and if that preferred site is available, route there, and if that preferred site is not available, route to the other site.
I have downloaded Camel, and have been trying to find an example which is close to what I want to do - but have not identified one yet.
Most of the examples bind to a specific web service schema - I don't want to do that if I can help it, because I have about 600 web services that I want to get in the way of, and route to my alternate sites.
I think I want to do something like this as a starter, to route from a new listener to a target, and then start adding things to check against my cache - this complains with "No component found with scheme: http", so it clearly is not correct.

    @Override
    public void configure() throws Exception {
        from("http://localhost:8087/").to("http://127.0.0.1:8084/");
    }
Is there a good relevant starting point?

RE: [External] Re: Content Based Routing Feasibility Q

Posted by Jens J Parappallil <je...@ibsplc.com>.
Hi,

Yes, You can take a look at the camel cxf examples. I had done a similar implementation by creating a separate camel component and then registering routes with this. The Registered routes would provide a set of filter conditions in your case the user which it is expecting. An http end point with a matching url pattern can be used together to meet this requirement. This would be similar to a dispatcher pattern implementation.

Cheers
Jens

-----Original Message-----
From: Onder SEZGIN [mailto:ondersezgin@gmail.com]
Sent: Friday, September 01, 2017 12:26 PM
To: users@camel.apache.org
Subject: [External] Re: Content Based Routing Feasibility Q

I would suggest you to see camel-cxf examples.
Maybe i got wrong but what you needed is like a web service's proxy. You
may also take a look at http component or maybe mina component.


On Thu, 31 Aug 2017 at 11:26, MLVJ <ml...@yahoo.co.uk.invalid> wrote:

> I have a problem, and I think that Camel can solve it, but I would like to
> be sure!
> What I want to do is to write a generic handler, to catch web service
> requests, look in the header, at the "USER", then identify a preferred
> destination for that user according to a regularly-refreshed cache, and if
> that preferred site is available, route there, and if that preferred site
> is not available, route to the other site.
> I have downloaded Camel, and have been trying to find an example which is
> close to what I want to do - but have not identified one yet.
> Most of the examples bind to a specific web service schema - I don't want
> to do that if I can help it, because I have about 600 web services that I
> want to get in the way of, and route to my alternate sites.
> I think I want to do something like this as a starter, to route from a new
> listener to a target, and then start adding things to check against my
> cache - this complains with "No component found with scheme: http", so it
> clearly is not correct.
>
>     @Override
>     public void configure() throws Exception {
>         from("http://localhost:8087/").to("http://127.0.0.1:8084/");
>     }
> Is there a good relevant starting point?
>
--
Sent from my iPhone


DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."

Re: Content Based Routing Feasibility Q

Posted by Onder SEZGIN <on...@gmail.com>.
I would suggest you to see camel-cxf examples.
Maybe i got wrong but what you needed is like a web service's proxy. You
may also take a look at http component or maybe mina component.


On Thu, 31 Aug 2017 at 11:26, MLVJ <ml...@yahoo.co.uk.invalid> wrote:

> I have a problem, and I think that Camel can solve it, but I would like to
> be sure!
> What I want to do is to write a generic handler, to catch web service
> requests, look in the header, at the "USER", then identify a preferred
> destination for that user according to a regularly-refreshed cache, and if
> that preferred site is available, route there, and if that preferred site
> is not available, route to the other site.
> I have downloaded Camel, and have been trying to find an example which is
> close to what I want to do - but have not identified one yet.
> Most of the examples bind to a specific web service schema - I don't want
> to do that if I can help it, because I have about 600 web services that I
> want to get in the way of, and route to my alternate sites.
> I think I want to do something like this as a starter, to route from a new
> listener to a target, and then start adding things to check against my
> cache - this complains with "No component found with scheme: http", so it
> clearly is not correct.
>
>     @Override
>     public void configure() throws Exception {
>         from("http://localhost:8087/").to("http://127.0.0.1:8084/");
>     }
> Is there a good relevant starting point?
>
-- 
Sent from my iPhone