public final class MessagingExample {</BUG>
private static final int MESSAGES_NUM = 10;
private enum TOPIC { ORDERED, UNORDERED }
public static void main(String[] args) throws Exception {
try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
<BUG>if (ignite.nodes().size() < 2) {
System.out.println();</BUG>
System.out.println(">>> Please start at least 2 cluster nodes to run example.");
System.out.println();
return;

package org.apache.ignite.examples;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import java.util.concurrent.*;
public final class MessagingExample {
private static final int MESSAGES_NUM = 10;
private enum TOPIC { ORDERED, UNORDERED }
public static void main(String[] args) throws Exception {
try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2)) {
System.out.println();
System.out.println(">>> Please start at least 2 cluster nodes to run example.");
System.out.println();
return;
