Hi Claus, thanks for your answer!
Isn't it so that setHeader only sets one (named) header? So to set multiple headers from a single query I do have to use content enricher + custom aggregation strategy? Alexander 2012/6/7 Claus Ibsen <[email protected]> > The setHeader DSL uses an expression, so if you can write an > expression that gets the SQL result then that can be done without a > processor. > You can also use the content enricher, but then you would need to > write a custom aggregation strategy to enrich the headers. > > > On Wed, Jun 6, 2012 at 11:18 PM, Alexander Kaiser > <[email protected]> wrote: > > Hi, > > > > I wonder whether it is possible to add message headers to a message based > > on the results of a jdbc query without writing a custom processor. > > > > E.g. I have a message with a header 'userid'. And I have a database table > > users which contains user's properties. > > Now I want to use the value of the userid header to query the database > > table users and add the columns received from the database as headers to > > the message. > > Further down the route I want to use the headers/properties recieved from > > the database to make routing decisions. > > > > -- > > Alexander > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: [email protected] > Web: http://fusesource.com > Twitter: davsclaus, fusenews > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > -- Alexander
