public static void main()

in resume-api/resume-api-cassandraql/src/main/java/org/apache/camel/example/resume/cassandra/main/MainApp.java [31:65]


    public static void main(String[] args) {
        String host = System.getProperty("cassandra.host", "localhost");
        String txtPort = System.getProperty("cassandra.cql3.port", "9042");

        int port = Integer.valueOf(txtPort);

        // Runs the load action
        String action = System.getProperty("resume.action");
        if ("load".equalsIgnoreCase(action)) {
            try {
                loadData(host, port);
                System.exit(0);
            } catch (Exception e) {
                System.err.println("Unable to load data: " + e.getMessage());
                e.printStackTrace();
                System.exit(1);
            }
        }

        // Normal code path for consuming from Cassandra
        final KafkaResumeStrategyConfigurationBuilder configurationBuilder = KafkaUtil.getDefaultKafkaResumeStrategyConfigurationBuilder();

        Main main = new Main();

        Integer batchSize = Integer.parseInt(System.getProperty("batch.size", "50"));
        CountDownLatch latch = new CountDownLatch(batchSize);
        Executors.newSingleThreadExecutor().submit(() -> waitForStop(main, latch));


        try (CassandraClient client = new CassandraClient(host, port)) {
            configurationBuilder.withResumeCache(new CaffeineCache<>(10240));
            main.configure().addRoutesBuilder(new CassandraRoute(latch, batchSize, configurationBuilder, client));
            main.start();
        }
    }