You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The String Data Format is a textual based format that supports encoding.

Options

Option

Default

Description

charset

null

To use a specific charset for encoding. If not provided Camel will use the JVM default charset.

Marshal

In this example we marshal the file content to String object in UTF-8 encoding.

from("file://data.csv").marshal().string("UTF-8").to("jms://myqueue");

Unmarshal

In this example we unmarshal the payload from the JMS queue to a String object using UTF-8 encoding, before its processed by the newOrder processor.

from("jms://queue/order").unmarshal().string("UTF-8").processRef("newOrder");
  • No labels