boolean foundRoute = false;
// If we found a destination, or this is a reply
if (exchange.getEndpoint() != null || exchange.getRole() == Role.CONSUMER) {
foundRoute = true;
Flow flow = defaultFlowChooser.chooseFlow(flows, exchange);
if (flow == null) {
throw new MessagingException("Unable to choose a flow for exchange: " + exchange);
}
flow.send(exchange);
}
if (exchange.getRole() == Role.PROVIDER) {
getSubscriptionManager().dispatchToSubscribers(exchange);
}