...
- Predicate using
when
to only trigger the interceptor in certain conditions stop
forces to stop continue routing the Exchange and mark it as completed successful. Camel will by default not stop.skip
when used withinterceptSendToEndpoint
will skip sending the Exchange to the original intended endpoint. Camel will by default not skip.interceptFrom
andinterceptSendToEndpoint
supports endpoint URI matching by: exact uri, wildcard, regular expression. See advanced section.- The intercepted endpoint uri is stored as message header
Exchange#INTERCEPTED_ENDPOINT
.
Tip | ||
---|---|---|
| ||
You can also instruct Camel to |
...
- match by exact URI name. This is the sample we have seen above.
- match by wildcard
- match by regular expression.
The real endpoint that was intercepted is stored as uri in the message IN header with the key Exchange.INTERCEPTED_ENDPOINT
.
This allows you to get hold of this information, when you for instance match by wildcard. Then you know the real endpoint that was intercepted and can react accordingly.
Match by wildcard
Match by wildcard allows you to match a range of endpoint or all of a given type. For instance use uri="file:*"
will match all File based endpoints.
...