camel-commits mailing list archives

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

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 22:18:54 2014
@@ -120,7 +120,14 @@ from("jgroups:clusterName").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">
+</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. The snippet below demonstrates how to collect only messages
received by the master node.</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[import
static org.apache.camel.component.jgroups.JGroupsFilters.dropNonCoordinatorViews;
+...
+from(&quot;jgroups:clusterName?enableViewMessages=true&quot;).
+  filter(dropNonCoordinatorViews()).
+  to(&quot;seda:masterNodeEventsQueue&quot;);
+]]></script>
+</div></div><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-width: 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);



Mime
View raw message