THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
class MyProcessor implements Processor { ProducerTemplate<Exchange> producer; public void setProducer({roducerTemplate<Exchange>ProducerTemplate<Exchange> producer) { this.producer = producer; } public Exchange process(Exchange inExchange) { // some loop for each message for (String template in templates) { // lets send a new exchange to the producers default destination // being called back so we can customize the message producer.send(new Processor() { public Exchange process(Exchange outExchange) { outExchange.getIn().setBody("This is the body"); // set some headers too? } }); } } |
...