Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
The LZF Data Format is a message compression and de-compression format. It uses the LZF deflate algorithm. Messages marshalled using LZF compression can be unmarshalled using LZF decompression just prior to being consumed at the endpoint. The compression capability is quite useful when you deal with large XML and Text based payloads or when you read messages previously comressed using LZF algotithm. OptionsThere are no options provided for this data format.
MarshalIn this example we marshal a regular text/XML payload to a compressed payload employing LZF compression format and send it an ActiveMQ queue called MY_QUEUE.
from("direct:start").marshal().lzf().to("activemq:queue:MY_QUEUE");
UnmarshalIn this example we unmarshal a LZF payload from an ActiveMQ queue called MY_QUEUE to its original format, and forward it for processing to the
from("activemq:queue:MY_QUEUE").unmarshal().lzf().process(new UnCompressedMessageProcessor());
DependenciesTo useLZF compression in your camel routes you need to add a dependency on camel-lzf which implements this data format. If you use Maven you can just add the following to your
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-lzf</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency>
|