Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A0FB0200AF8 for ; Thu, 5 May 2016 17:27:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9F8B7160A05; Thu, 5 May 2016 15:27:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E7E63160A04 for ; Thu, 5 May 2016 17:27:48 +0200 (CEST) Received: (qmail 9428 invoked by uid 500); 5 May 2016 15:27:48 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 9325 invoked by uid 99); 5 May 2016 15:27:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2016 15:27:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A2376DFE16; Thu, 5 May 2016 15:27:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: acosentino@apache.org To: commits@camel.apache.org Date: Thu, 05 May 2016 15:27:49 -0000 Message-Id: In-Reply-To: <0e8301ca1c2c4170a7518d414339bd89@git.apache.org> References: <0e8301ca1c2c4170a7518d414339bd89@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/3] camel git commit: Added camel-lzf dataformat to Gitbook archived-at: Thu, 05 May 2016 15:27:49 -0000 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 Authored: Thu May 5 16:57:56 2016 +0200 Committer: Andrea Cosentino 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] +---------------------------------------------------------- + + org.apache.camel + camel-lzf + x.x.x + + +---------------------------------------------------------- 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