}) .end() // end loop
if (i > 0) { if (parent instanceof PipelineDefinition) { parent = parent.end(); } else if (parent instanceof ExpressionNode) { parent = parent.endParent(); if (parent instanceof PipelineDefinition) { parent = parent.process(OutMessageCaptureProcessor.INSTANCE); parent = parent.end(); } else if (parent instanceof ExpressionNode) { parent = parent.process(OutMessageCaptureProcessor.INSTANCE);
private void addThrottling(TryDefinition route) { Throttling throttling = _reference.getServiceMetadata().getThrottling(); long timePeriodMS = throttling != null ? throttling.getTimePeriod() : Throttling.DEFAULT_TIME_PERIOD; route.filter(THROTTLE_CHECK) .throttle(header(Throttling.MAX_REQUESTS)).timePeriodMillis(timePeriodMS) // throttle needs a child process, so we'll just remove the header // using an empty process definition causes some of the interceptors // to blow chunks, specifically audit interceptors .removeHeader(Throttling.MAX_REQUESTS) .end().end(); } }
private void addThrottling(TryDefinition route) { Throttling throttling = _reference.getServiceMetadata().getThrottling(); long timePeriodMS = throttling != null ? throttling.getTimePeriod() : Throttling.DEFAULT_TIME_PERIOD; route.filter(THROTTLE_CHECK) .throttle(header(Throttling.MAX_REQUESTS)).timePeriodMillis(timePeriodMS) // throttle needs a child process, so we'll just remove the header // using an empty process definition causes some of the interceptors // to blow chunks, specifically audit interceptors .removeHeader(Throttling.MAX_REQUESTS) .end().end(); } }
@Override public void configure() { from("direct:start") .id("start") .routePolicy(new ActivityTrackingPolicy(activityTracker)) .split() .body() .process(OutMessageCaptureProcessor.INSTANCE) .pipeline() .id("log") .log(LoggingLevel.INFO, "log", "log", "hi") .process(OutMessageCaptureProcessor.INSTANCE) .end() .pipeline() .id("rnderr") .process().body(String.class, body -> { if ("error".equals(body)) { throw new RuntimeException("Bean Error"); } }) .process(OutMessageCaptureProcessor.INSTANCE) .end() .pipeline() .id("end") .to("mock:end") .process(OutMessageCaptureProcessor.INSTANCE) .end() .end(); } });