Hi,
I wrote some test to implements your request and found current Proxy way
can't not inject the header as you want, because Camel will create a
BeanInvocation to hold the invocation information of the dynamical
proxy. It is hard to tell the route to filter the header from you message.
If you are using the ProducerTemplate to send the message into the camel
route , it could be more easy to implement your requirement :)
Willem
senthil.arumugam wrote:
Hi,
I have created a producer interface to send messages to specified endpoint.
Can I add a header to each message I send from my producer ? I would like to
get an example for the same.
Is it possible to add an annotation in my producer like the below mentioned
? Will camel inject the property or header, when I am calling this method to
send a message ?
public interface Producer {
void send(@Header(value="foo") String foo, Foo foo);
}
If camel injects header here, how can I check it using filter in my route
configuration with spring ?
Thanks in advance.
-SK