Search in sources :

Example 1 with MultiConsumersOneOuputTopicProducers

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();
    }
}
Also used : MultiConsumersOneOuputTopicProducers(org.apache.pulsar.functions.instance.producers.MultiConsumersOneOuputTopicProducers) SimpleOneOuputTopicProducers(org.apache.pulsar.functions.instance.producers.SimpleOneOuputTopicProducers)

Aggregations

MultiConsumersOneOuputTopicProducers (org.apache.pulsar.functions.instance.producers.MultiConsumersOneOuputTopicProducers)1 SimpleOneOuputTopicProducers (org.apache.pulsar.functions.instance.producers.SimpleOneOuputTopicProducers)1