...
Code Block |
---|
from("file://foo/bar"). unmarshal().serialization(). to("activemq:Some.Queue"); |
Marshalling
Marshalling is the opposite of unmarshalling, where a bean is marshalled into some binary or textual format for transmission over some transport via a Camel Component. Marshalling is used in the same way as unmarshalling above; in the DSL you can use a DataFormat instance, you can configure the DataFormat dynamically using the DSL or you can refer to a named instance of the format in the Registry.
The following example unmarshals via serialization then marshals using a named JAXB data format to perform a kind of Message Translator
Code Block |
---|
from("file://foo/bar").
unmarshal().serialization().
marshal("jaxb").
to("activemq:Some.Queue");
|