Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Predicate using when to only trigger the interceptor in certain conditions
  • proceed to continue routing from the point of interception when the interceptor is finished. proceed is default and can be omitted.
  • stop when used with intercept will stops routing the Exchange completely. Camel will by default not stop.
  • stop skip when used with interceptSendToEndpoint will skip sending the Exchange to the original intended endpoint. Camel will by default not skip.

...

And to skip sending to the mock:foo endpoint we use the stop*skip() DSL in the route at the end to instruct Camel to skip sending . The name *stop() is used as the interceptSendToEndpoint builds on top of intercept and thus we inherit the DSL keywordsto the original intended endpoint.

Wiki Markup
{snippet:id=e3|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptEndpointTest.java}

...

Wiki Markup
{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptendpointwhen.xml}

And the 3rd with the stop skip, notice skip is set with the skipSendToOriginalEndpoint attribute on the interceptSendToEndpoint tag:

Wiki Markup
{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptendpointskip.xml}