Think you meant to send this to the Camel mailing list, not ActiveMQ

On 09/20/2016 04:45 PM, Ismail Emre Kartoglu wrote:
Hello Camel users,

I have a question regarding the camel-rabbitmq component. The following code 
sends the message “test” to exchange “A” with routing key “B”:

from("timer:test?period=5000").process(new Processor() {
             public void process(Exchange exchange) throws Exception {
                 exchange.getOut().setBody("test", String.class);
"A”);   **
"B”);   **

However when I comment out the lines with **, the message does not get sent. Is this 
an expected behaviour? I found this stack overflow post, essentially discussing the 
same issue:

There is a paragraph at 
<> that says

"Headers are set by the consumer once the message is received. The producer 
will also set the headers for downstream processors once the exchange has taken 
place. Any headers set prior to production that the producer sets will be 

The last sentence seems to suggest that the behaviour I described here is 
expected. My question then is would it not make more sense if we did not have 
to specifically set the headers in the out message?

Kind regards,

Tim Bish
twitter: @tabish121

Reply via email to