Petals-SE-Camel 1.1.0+

compared with
Version 5 by Victor NOËL
on Sep 21, 2017 15:11.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (1)

View Page History
Even though it's not the most recommended (because of its implicit nature), if no MEP is set neither on the Consumes or the Camel endpoint URI, then the MEP of the Camel exchange will be used.

h1. Manipulating JBI faults in a Camel route

Apache Camel does not support advanced manipulation of faults through their {{Exchange}}/{{Message}} API:
if a message is marked as being a fault (via {{Message.isFault}}), it won't be possible in a Camel route to process it as a normal message.
The route will simply stop its processing.
This is because Camel does not encourage a WSDL-oriented paradigm of defining exchanges like JBI do.

Hence, the Camel SE introduces some helpers (in {{camel-petals}}'s {{PetalsRouteBuilder}}) to reand and mark messages as faults outside of the facilities provided by Camel.

Basically, static methods are available to test if an {{Exchange}} is failed or a {{Message}} is a fault, as well as to set them as fault.
They add an extra header to the exchange to mark the out message.
The message itself is just a message like any other.

The helpers also allow for stopping the routing when setting a fault, if desired.

h1. Examples