Reputation: 5147
I'd like to dynamically invoke bean method depending on some header value:
This seems doesn't work: <to uri="bean:myBean?method=${in.header.methodName}&multiParameterArray=true"/>
Any ideas?
Upvotes: 1
Views: 1125
Reputation: 55535
See this FAQ
From Camel 2.16 its easier as you can use <toD ..
which is the dynamic-to. In older releases you can use the recipient list EIP. Its all explained in that FAQ.
Upvotes: 1
Reputation: 540
You can just set the method name in the header called "CamelBeanMethodName" and route your message to "bean" without specifying any method.
Upvotes: 2