package failure.example;
import org.apache.camel.builder.RouteConfigurationBuilder; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; @Configuration @Component public class FailedRouteConfigurationBuilder extends RouteConfigurationBuilder { @Override public void configuration() throws Exception { routeConfiguration("pocRouteCompletion").interceptFrom().log("Open context").end().onCompletion() .onFailureOnly().modeBeforeConsumer().log("Failed context").end().onCompletion().onCompleteOnly() .modeBeforeConsumer().log("Finished context").end(); } }