camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r892368 - in /websites/production/camel/content: cache/main.pageCache jgroups.html
Date Wed, 01 Jan 2014 17:18:55 GMT
Author: buildbot
Date: Wed Jan  1 17:18:55 2014
New Revision: 892368

Log:
Production update by buildbot for camel

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

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

Modified: websites/production/camel/content/jgroups.html
==============================================================================
--- websites/production/camel/content/jgroups.html (original)
+++ websites/production/camel/content/jgroups.html Wed Jan  1 17:18:55 2014
@@ -111,7 +111,7 @@
 </div></div><h3 id="JGroups-URIformat">URI format</h3><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[jgroups:clusterName[?options]
 ]]></script>
-</div></div><p>Where <strong>clusterName</strong> represents
the name of the JGroups cluster the component should connect to.</p><h3 id="JGroups-Options">Options</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>channelProperties</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.0:</strong>
Specifies configuration properties of the <a shape="rect" class="external-link" href="http://www.jgroups.org/javadoc/org/jgroups/JChannel.html"
rel="nofollow">JChannel </a> used by the endpoint.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>enableViewMessages</code><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.13.0</strong>:&#160;
Consumer only. If set to <code>true</code>, the consumer endpoint will receive
<code>org.jgroups.View</code> messages as well (not only <code>org.jgroups.Message</code>
instances).</td></tr></tbody></table></div><h3 id="JGroups-Usage">Usage</h3><p>Using
<code>jgroups</code> component on the consumer side of the route will capture
messages received by the <code>JChannel</code> associated with the endpoint and
forward them to the Camel route. JGroups consumer processes incoming messages <a shape="rect"
class="external-link" href="http://camel.apache.org/asynchronous-routing-engine.html">asynchronously</a>.</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+</div></div><p>Where <strong>clusterName</strong> represents
the name of the JGroups cluster the component should connect to.</p><h3 id="JGroups-Options">Options</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>channelProperties</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.0:</strong>
Specifies configuration properties of the <a shape="rect" class="external-link" href="http://www.jgroups.org/javadoc/org/jgroups/JChannel.html"
rel="nofollow">JChannel </a> used by the endpoint.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>enableViewMessages</code><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.13.0</strong>:&#160;
Consumer only. If set to <code>true</code>, the consumer endpoint will receive
<code>org.jgroups.View</code> messages as well (not only <code>org.jgroups.Message</code>
instances). By default only regular messages are consumed by the endpoint.</td></tr></tbody></table></div><h3
id="JGroups-Headers">Headers</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh">Header</th><th colspan="1" rowspan="1"
class="confluenceTh">Constant</th><th colspan="1" rowspan="1" class="confluenceTh">Since
version</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>JGROUPS_ORIGINAL_MESSAGE</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>JGroupsEndpoint.HEADER_JGROUPS_ORIGINAL_MESSAGE<
 /code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>2.13.0</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">The original <code>org.jgroups.Message</code>
instance from which the body of the consumed message has been extracted.</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>JGROUPS_SRC</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code><code>JGroupsEndpoint.</code>HEADER_JGROUPS_SRC</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>2.10.0</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">The <code>org.jgroups.Address</code>
instance extracted by <code>org.jgroups.Message</code>.getSrc() method of the
consumed message.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>JGROUPS_DEST</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code><code>JGroupsEndpoint.</code>HEADER_JGROUPS_DEST</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>2.10.0</stron
 g></td><td colspan="1" rowspan="1" class="confluenceTd">The <code>org.jgroups.Address</code>
instance extracted by <code>org.jgroups.Message</code>.getDest() method of the
consumed message.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>JGROUPS_CHANNEL_ADDRESS</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code><code>JGroupsEndpoint.</code>HEADER_JGROUPS_CHANNEL_ADDRESS</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>2.13.0</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">Address (<code>org.jgroups.Address</code>)
of the channel associated with the endpoint.</td></tr></tbody></table></div><p>&#160;</p><h3
id="JGroups-Usage">Usage</h3><p>Using <code>jgroups</code> component
on the consumer side of the route will capture messages received by the <code>JChannel</code>
associated with the endpoint and forward them to the Camel route. JGroups consumer processes
incoming messages <a shape="rect" class="external-link" href
 ="http://camel.apache.org/asynchronous-routing-engine.html">asynchronously</a>.</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[//
Capture messages from cluster named
 // &#39;clusterName&#39; and send them to Camel route.
 from(&quot;jgroups:clusterName&quot;).to(&quot;seda:queue&quot;);
@@ -120,6 +120,11 @@ from(&quot;jgroups:clusterName&quot;).to
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[//
Send message to the cluster named &#39;clusterName&#39;
 from(&quot;direct:start&quot;).to(&quot;jgroups:clusterName&quot;);
 ]]></script>
+</div></div><h3 id="JGroups-Predefinedfilters">Predefined filters</h3><p>JGroups
component comes with predefined filters factory class named <code>JGroupsFilters.</code></p><p>If
you would like to consume only view changes notifications sent to coordinator of the cluster
(and ignore these sent to the "slave" nodes), use the <code>JGroupsFilters.dropNonCoordinatorViews()</code>
filter. This filter is particularly useful when you want a single Camel node to become the
master in the cluster, because messages passing this filter notifies you when given node has
become a coordinator of the cluster.</p><h3 id="JGroups-Examples">Examples</h3><h4
id="JGroups-Receiveclusterviewchangenotifications">Receive cluster view change notifications</h4><p>The
snippet below demonstrates how to create the consumer endpoint listening to the&#160;notifications
regarding cluster membership changes. By default only regular messages are consumed by the
endpoint.</p><div class="code panel pdl" style="border-w
 idth: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[mockEndpoint.setExpectedMessageCount(1);
+mockEndpoint.message(0).body().isInstanceOf(org.jgroups.View.class);
+from(&quot;jgroups:clusterName?enableViewMessages=true&quot;).to(mockEndpoint);
+mockEndpoint.assertIsSatisfied();]]></script>
 </div></div></div>
         </td>
         <td valign="top">



Mime
View raw message