...
Code Block |
|
|
// Send message to the cluster named 'clusterName'
from("direct:start").to("jgroups:clusterName");
|
Predefined filters
JGroups component comes with predefined filters factory class named JGroupsFilters.
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 JGroupsFilters.dropNonCoordinatorViews() 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.
Examples
Receive cluster view change notifications
...