Big Thanks Now everything works fine. In my opinion, what you showed belowed and what worked for me now is a Dynamic Router Pattern from the Enterprise Integration Patterns book. Perhaps this could/should be added to the Camel website? What do you think about that?
Greetings Robert -----Ursprüngliche Nachricht----- Von: Roman Kalukiewicz [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 28. Dezember 2007 17:05 An: [email protected] Betreff: Re: XPath splitter again Forget such approach ;) Notice that the method you are implementing is configure() method - it is executed ONCE at the very beginning. It is not executed on each message. And concatenation you use is executed when configure() method is executed - it is still Java after all. what you could do is from("activemq:queue:camel.train.plan.queue.router") .setHeader("endpointName", constant("activemq:queue:camel.train.plan.queue.").append(new Expression() { public Object evaluate(Exchange exchange) { return <evaluate your queue name postfix> })) .receipentList(header("endpointName")); } Maybe instead of using new Expression() it will be enough to evaluate the value using xpath or el so it will be simpler? If you have only short list of destinations then maybe filter() is better for you? Roman
