use of net.openhft.load.config.PublisherConfig in project Chronicle-Queue by OpenHFT.
the class PublisherMain method main.
public static void main(String[] args) throws Exception {
// MlockAll.doMlockall();
if (args.length != 1) {
throw new IllegalArgumentException("Usage: <program> [resource-name]");
}
final ConfigParser configParser = new ConfigParser(args[0]);
final PublisherConfig publisherConfig = configParser.getPublisherConfig();
final ExecutorService executorService = Executors.newFixedThreadPool(2);
executorService.submit(new PretoucherTask(outputQueue(publisherConfig.outputDir()), configParser.getPretouchIntervalMillis()));
executorService.submit(new HiccupReporter()::start);
final Publisher publisher = new Publisher(publisherConfig, createOutput(publisherConfig.outputDir()), configParser.getAllStageConfigs());
publisher.init();
publisher.startPublishing();
}
Aggregations