Data format
Camel supports a pluggable data format allowing you to marshall and unmarshall the messages.
For instance, if you receive an XML message from an endpoint, you can:
Directly manipulate and transport the XML message in the route
Translate the XML to a POJO using JAXB, for instance, JAXB is a data format
Unmarshalling allows you to use a data format to convert from a raw format (XML in the previous example) into a Java object. On the other hand, when you send an exchange to an endpoint, you can marshall the transported object into another format. You specify where you want to unmarshall or marshall and the data format to use.
For instance, you can consume an XML message from a JMS queue, unmarshall using JAXB, and send the resulting object to another JMS queue:
from("jms:queue:orders").unmarshal("jaxb").to("jms:queue:other")
You can also unmarshall files containing a serialized object, and then marshall using JAXB to send the resulting XML message to a JMS queue:
from("file:data/inbox"...