camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r956272 - in /websites/production/camel/content: cache/main.pageCache zeromq.html
Date Sun, 28 Jun 2015 09:18:42 GMT
Author: buildbot
Date: Sun Jun 28 09:18:42 2015
New Revision: 956272

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/zeromq.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/zeromq.html
==============================================================================
--- websites/production/camel/content/zeromq.html (original)
+++ websites/production/camel/content/zeromq.html Sun Jun 28 09:18:42 2015
@@ -75,69 +75,22 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="ZeroMQ-CamelZeroMQComponent">Camel
ZeroMQ Component</h2>
-<p><strong>Available as of Camel 2.11</strong></p>
-
-<p>The <strong>camel-zeromq</strong> component is provided by the <a
shape="rect" class="external-link" href="http://code.google.com/p/camel-extra/" rel="nofollow">Camel
Extra</a> project which hosts *GPL related components for Camel.</p>
-
-<p>The <strong>camel-zeromq</strong> component allows you to consumer or
produce messages using <a shape="rect" class="external-link" href="http://zeromq.org/"
rel="nofollow">ZeroMQ</a>. Zeromq requires a bit of work to get setup, especially
on windows. Refer to <a shape="rect" class="external-link" href="http://www.zeromq.org/intro:get-the-software"
rel="nofollow">the documentation</a>. Note: This component works with the stable
2.2 branch and not the pre-release 3.2.</p>
-
-<p>This component uses Akka for it's Zeromq "driver" but does not use Scala Actors.
This means the component does not require the JZMQ libraries to be built and present, just
the native ZeroMQ library that is installed when you build ZeroMQ on your system. There is
some discussion as to the speed of the Akka driver, and so it is possible to switch to using
the JZMQ driver if you wish. Simply remove the Akka Zeromq dependancy and replace it with
the JZMQ jar and ensure the zmq.lib is present on your system. For more information see <a
shape="rect" class="external-link" href="http://www.zeromq.org/bindings:java" rel="nofollow">here</a>.</p>
-
-<p>Maven users will need to add the following dependency to their <code>pom.xml</code>
for this component:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
-    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+<div class="wiki-content maincontent"><h2 id="ZeroMQ-CamelZeroMQComponent">Camel
ZeroMQ Component</h2><p><strong>Available as of Camel 2.11</strong></p><p>The
<strong>camel-zeromq</strong> component is provided by the <a shape="rect"
class="external-link" href="http://code.google.com/p/camel-extra/" rel="nofollow">Camel
Extra</a> project which hosts *GPL related components for Camel.</p><p>The
<strong>camel-zeromq</strong> component allows you to consumer or produce messages
using <a shape="rect" class="external-link" href="http://zeromq.org/" rel="nofollow">ZeroMQ</a>.
Zeromq requires a bit of work to get setup, especially on windows. Refer to <a shape="rect"
class="external-link" href="http://www.zeromq.org/intro:get-the-software" rel="nofollow">the
documentation</a>. Note: This component works with the stable 2.2 branch and not the
pre-release 3.2.</p><p>This component uses Akka for it's Zeromq "driver" but does
not use Scala Actors. This means the component does not require the 
 JZMQ libraries to be built and present, just the native ZeroMQ library that is installed
when you build ZeroMQ on your system. There is some discussion as to the speed of the Akka
driver, and so it is possible to switch to using the JZMQ driver if you wish. Simply remove
the Akka Zeromq dependancy and replace it with the JZMQ jar and ensure the zmq.lib is present
on your system. For more information see <a shape="rect" class="external-link" href="http://www.zeromq.org/bindings:java"
rel="nofollow">here</a>.</p><p>Maven users will need to add the following
dependency to their <code>pom.xml</code> for this component:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+    &lt;groupId&gt;org.apache-extras.camel-extra&lt;/groupId&gt;
     &lt;artifactId&gt;camel-zeromq&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-<h3 id="ZeroMQ-URIformat">URI format</h3>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-zeromq:(tcp|ipc)://hostname:port[?options]
+</div></div><h3 id="ZeroMQ-URIformat">URI format</h3><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[zeromq:(tcp|ipc)://hostname:port[?options]
 ]]></script>
-</div></div>
-
-<p>Where <strong>hostname</strong> is the hostname or ip where the server
will run. </p>
-
-<h3 id="ZeroMQ-Options">Options</h3>
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Property </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>socketType</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>none</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Choose
from PULL, SUBSCRIBE for consumers, or PUSH, PUBLISH for producers </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>asyncConsumer</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Sets
the consumer to be async. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>topics</code> </p></td><td
colspan="1" rowspan="1" class="confluen
 ceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Applicable for subscribers and publishers only.
Determines which topics to subscribe or publish to. If not specified then the subscriber will
subscribe to all messages. If not specified by a publisher then no topic will be prefixed
to the message. Specify multiple topics by a comma separated list </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>messageIdEnabled</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If enabled
then camel-zeromq will add a unique UUID to each message as it is received </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>messageConvertor</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>DefaultMessageConvertor</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The
message conve
 rtor that is used to turn an exchange into a byte array for dispatch through zeromq. See
later section. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>highWaterMark</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>-1</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> By default, zeromq will keep messages
in an in-memory buffer while waiting for clients to receive. The high water mark is the max
number of messages to hold before throwing an exception. -1 sets to the zeromq default, 0
disables, and any positive value sets to that value. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>linger</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-1</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> By default,
zeromq will wait for sending messages to be received before shutting down. Linger is the number
of seconds to wait before force closing the
  socket. -1 sets to the zeromq default, 0 disables, and any positive value sets to that value.
</p></td></tr></tbody></table></div>
-</div>
-
-<h3 id="ZeroMQ-Headers">Headers</h3>
-
-<p>The follwing headers are set on exchanges during message transport.</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Header Name </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Endpoint Type </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> ZeroMQMessageId </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Consumer </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> A type 4 UUID that is added to received
messages </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
ZeroMQTimestamp </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
Both </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
The timestamp when the message was received </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> ZeroMQSource </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Both </p></td><td
colspan="1" rowspan="1"
  class="confluenceTd"><p> The socket address where the message was received from
or pushed to </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
ZeroMQSocketType </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
Both </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
The type of zeromq that the message was received from or pushed to </p></td></tr></tbody></table></div>
-
-
-<h3 id="ZeroMQ-MessageConversion">Message Conversion</h3>
-
-<p>ZeroMQ sends its messages as a byte stream and so incoming messages have the body
set as a byte[] array. When sending to a producer, the messageConvertor is invoked, and passed
the Exchange. The DefaultMessageConvertor will return the body as is, if it is a byte array,
otherwise it will call toString().getBytes(). You can provide custom conversion strategies
by specifying a class to the messageConvertor option on the endpoint.</p>
-
-<h3 id="ZeroMQ-Samples">Samples</h3>
-
-<p>To receive all messages from a publisher, and then print those to a logger:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-from(&quot;zeromq:tcp://127.0.0.1:5555&quot;).process(someLoggingProcessor);
+</div></div><p>Where <strong>hostname</strong> is the hostname
or ip where the server will run.</p><h3 id="ZeroMQ-Options">Options</h3><div
class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p>Property</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>socketType</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>none</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Choose from PULL, SUBSCRIBE for consumers,
or PUSH, PUBLISH for producers</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>asyncConsumer</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Sets the consumer to b
 e async.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>topics</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Applicable for subscribers and publishers
only. Determines which topics to subscribe or publish to. If not specified then the subscriber
will subscribe to all messages. If not specified by a publisher then no topic will be prefixed
to the message. Specify multiple topics by a comma separated list</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>messageIdEnabled</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If enabled then camel-zeromq will
add a unique UUID to each message as it is received</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>messageConvertor</code></p></td><td
colspan="1" rowspan="1" clas
 s="confluenceTd"><p><code>DefaultMessageConvertor</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The message convertor that is used
to turn an exchange into a byte array for dispatch through zeromq. See later section.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>highWaterMark</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>By default, zeromq will keep messages
in an in-memory buffer while waiting for clients to receive. The high water mark is the max
number of messages to hold before throwing an exception. -1 sets to the zeromq default, 0
disables, and any positive value sets to that value.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>linger</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>By default, zeromq will wait 
 for sending messages to be received before shutting down. Linger is the number of seconds
to wait before force closing the socket. -1 sets to the zeromq default, 0 disables, and any
positive value sets to that value.</p></td></tr></tbody></table></div></div><h3
id="ZeroMQ-Headers">Headers</h3><p>The follwing headers are set on exchanges
during message transport.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p>Header Name</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Endpoint Type</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>ZeroMQMessageId</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Consumer</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>A type 4 UUID that is added to received
messages</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ZeroMQTimestamp</p></
 td><td colspan="1" rowspan="1" class="confluenceTd"><p>Both</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The timestamp when the message was
received</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ZeroMQSource</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Both</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The socket address where the message was received
from or pushed to</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>ZeroMQSocketType</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Both</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The
type of zeromq that the message was received from or pushed to</p></td></tr></tbody></table></div><h3
id="ZeroMQ-MessageConversion">Message Conversion</h3><p>ZeroMQ sends its messages
as a byte stream and so incoming messages have the body set as a byte[] array. When sending
to a producer, the messageConvertor is invoked, and passed the Exch
 ange. The DefaultMessageConvertor will return the body as is, if it is a byte array, otherwise
it will call toString().getBytes(). You can provide custom conversion strategies by specifying
a class to the messageConvertor option on the endpoint.</p><h3 id="ZeroMQ-Samples">Samples</h3><p>To
receive all messages from a publisher, and then print those to a logger:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;zeromq:tcp://127.0.0.1:5555&quot;).process(someLoggingProcessor);
 ]]></script>
-</div></div>
-
-<p>To broadcast a message every second on three topics:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-        from(&quot;timer://foo?fixedRate=true&amp;period=10&quot;).process(new
Processor() {
+</div></div><p>To broadcast a message every second on three topics:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
       from(&quot;timer://foo?fixedRate=true&amp;period=10&quot;).process(new
Processor() {
         
         List&lt;String&gt; asList = Arrays.asList(&quot;coldplay&quot;, &quot;keane&quot;,
&quot;jethro tull&quot;, &quot;jack bruce&quot;, &quot;elton john&quot;,
&quot;kate bush&quot;);
 



Mime
View raw message