use of org.apache.pulsar.functions.instance.producers.MultiConsumersOneOuputTopicProducers in project incubator-pulsar by apache.
the class JavaInstanceRunnable method startOutputProducer.
private void startOutputProducer() throws Exception {
if (instanceConfig.getFunctionConfig().getOutput() != null && !instanceConfig.getFunctionConfig().getOutput().isEmpty() && this.outputSerDe != null) {
log.info("Starting producer for output topic " + instanceConfig.getFunctionConfig().getOutput());
if (processingGuarantees == ProcessingGuarantees.EFFECTIVELY_ONCE) {
this.outputProducer = new MultiConsumersOneOuputTopicProducers(client, instanceConfig.getFunctionConfig().getOutput());
} else {
this.outputProducer = new SimpleOneOuputTopicProducers(client, instanceConfig.getFunctionConfig().getOutput());
}
this.outputProducer.initialize();
}
}
Aggregations