CommandLine commandLine = parseArgs(args);
String topic = commandLine.getOptionValue("topic");
int messages = ((Number) commandLine.getParsedOptionValue("messages")).intValue();
int producers = ((Number) commandLine.getParsedOptionValue("producers")).intValue();
for (int i = 0; i < producers; ++i) {
TestLogMessageProducer producer = new TestLogMessageProducer(topic, messages);
producer.start();
}
} catch (Throwable t) {
LOG.error("Log message producer failed", t);
System.exit(1);
}