onCompletion().to("mock:sync");
from("direct:start")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
exchange.addOnCompletion(new SynchronizationAdapter() {
@Override
public void onDone(Exchange exchange) {
template.sendBody("mock:sync", "A");
}
@Override
public String toString() {
return "A";
}
});
exchange.addOnCompletion(new SynchronizationAdapter() {
@Override
public void onDone(Exchange exchange) {
template.sendBody("mock:sync", "B");
}
@Override
public String toString() {
return "B";
}
});
exchange.addOnCompletion(new SynchronizationAdapter() {
@Override
public void onDone(Exchange exchange) {
template.sendBody("mock:sync", "C");
}