camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [3/3] camel git commit: Added camel-lzf dataformat to Gitbook
Date Thu, 05 May 2016 15:27:49 GMT
Added camel-lzf dataformat to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2835123b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2835123b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2835123b

Branch: refs/heads/master
Commit: 2835123b422b7fdcf60afd26951b9738a269407f
Parents: 40b48c9
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Thu May 5 16:57:56 2016 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Thu May 5 17:27:30 2016 +0200

----------------------------------------------------------------------
 components/camel-lzf/src/main/docs/lzf.adoc | 76 ++++++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md              |  1 +
 2 files changed, 77 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2835123b/components/camel-lzf/src/main/docs/lzf.adoc
----------------------------------------------------------------------
diff --git a/components/camel-lzf/src/main/docs/lzf.adoc b/components/camel-lzf/src/main/docs/lzf.adoc
new file mode 100644
index 0000000..34697f4
--- /dev/null
+++ b/components/camel-lzf/src/main/docs/lzf.adoc
@@ -0,0 +1,76 @@
+[[LZF-LZFDataFormat]]
+LZF Data Format
+~~~~~~~~~~~~~~~
+
+The
+LZF https://cwiki.apache.org/confluence/display/CAMEL/Data+Format[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.
+
+[[LZFDataFormat-Options]]
+Options
+^^^^^^^
+
+There are no options provided for this data format.
+
+[width="100%",cols="<25%,<25%,<25%,<25%",options="header",]
+|=======================================================================
+|Name |Type |Default |Description
+|usingParallelCompression |`boolean` |`false`
+|`Enable parallel compressor` implementation which can encode (compress)
+content using multiple processing cores: concurrent compression works on
+chunk-by-chunk basis (64k max chunk size) so megabyte-sized content can
+be processed very efficiently.
+|=======================================================================
+
+[[LZFDataFormat-Marshal]]
+Marshal
+^^^^^^^
+
+In 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.
+
+[source,java]
+-------------------------------------------------------------------
+from("direct:start").marshal().lzf().to("activemq:queue:MY_QUEUE");
+-------------------------------------------------------------------
+
+[[LZFDataFormat-Unmarshal]]
+Unmarshal
+^^^^^^^^^
+
+In 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 `UnGZippedMessageProcessor`.
+
+[source,java]
+----------------------------------------------------------------------------------------------
+from("activemq:queue:MY_QUEUE").unmarshal().lzf().process(new UnCompressedMessageProcessor());
+----------------------------------------------------------------------------------------------
+
+[[LZFDataFormat-Dependencies]]
+Dependencies
+^^^^^^^^^^^^
+
+To 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 `pom.xml`,
+substituting the version number for the latest & greatest release
+(see https://cwiki.apache.org/confluence/display/CAMEL/Download[the
+download page for the latest versions]).
+
+[source,xml]
+----------------------------------------------------------
+<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>
+----------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/camel/blob/2835123b/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 370cac5..00034c9 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -212,6 +212,7 @@
     * [Ical](ical.adoc)
     * [Jaxb](jaxb.adoc)
     * [Jibx](jibx.adoc)
+    * [Lzf](lzf.adoc)
     * [XML JSON](xmljson.adoc)
 
 * User Guide


Mime
View raw message