diff --git a/pulsar-functions/instance/src/main/python/python_instance.py b/pulsar-functions/instance/src/main/python/python_instance.py index 6f74461e8532f..66d222c73cc08 100644 --- a/pulsar-functions/instance/src/main/python/python_instance.py +++ b/pulsar-functions/instance/src/main/python/python_instance.py @@ -272,7 +272,8 @@ def done_producing(self, consumer, orig_message, result, sent_message): consumer.acknowledge(orig_message) def process_result(self, output, msg): - if output is not None: + if output is not None and self.instance_config.function_details.sink.topic != None and \ + len(self.instance_config.function_details.sink.topic) > 0: if self.output_serde is None: self.setup_output_serde() if self.producer is None: