Hi Thanks for the review and comments.
Okay squashed and merged on master branch. Lets do optimisations for other components. On Mon, Apr 23, 2018 at 12:50 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > We have ticket > https://issues.apache.org/jira/browse/CAMEL-12462 > > Its an idea I had though about in the past, even before we had toD. > However I do think that the simplification toD gives Camel end users, > can warrant that we attempted to look at this again. > > In particular when you have HTTP endpoints that are dynamic (different > query parameters, context-path, etc) but calling to the same HTTP > server, then toD should ideally be optimised to deal with this > out-of-the-box. Today you end up with unique Camel endpoints per > unique combo computed from toD. > > So CAMEL-12462 optimised and resolved this. However it does this with > a little bit of complexity of parsing the computed endpoint uri to > resolve it into 3 parts > > - static base uri > - dynamic context-path > - dynamic query parameters > > Then it will use the static base url, as the Camel endpoint, and > therefore resolve into a single endpoint and Camel http producer. And > the dynamic parts are automatic provided in Camel headers that the > HTTP producer supports (HTTP_PATH and HTTP_QUERY). > > Anyway the PR has some docs and examples and more details in the > updated adoc file for toD, so take a look at that file. > > I implemented this with a way for components to support this by > providing a service locator file in the send-dynamic folder of > META-INF, eg same way we discover components. This way other > components can provide their own optimisation implementation in the > future. For example to other kinds of components like JMS, Kafka and > others. > > I wanted to give the community and other Camel committers a chance to > provide feedback, review, improve, etc - before we merged this into > the master branch. > > There is a GitHub PR that makes it easier to browse the code changes > https://github.com/apache/camel/pull/2302 > > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2