Base64 Data FormatAvailable as of Camel 2.11 Options
MarshalIn this example we marshal the file content to base64 object.
from("file://data.bin").marshal().base64().to("jms://myqueue");
UnmarshalIn this example we unmarshal the payload from the JMS queue to a byte[] object, before its processed by the newOrder processor.
from("jms://queue/order").unmarshal().base64().processRef("newOrder");
DependenciesTo use Base64 in your Camel routes you need to add a dependency on camel-base64 which implements this data format. If you use Maven you can just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions). <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-base64</artifactId> <version>2.11.0</version> </dependency> |