diff --git a/src/main/java/io/kestra/plugin/kafka/Produce.java b/src/main/java/io/kestra/plugin/kafka/Produce.java index 57fe91d..2d2c6a5 100644 --- a/src/main/java/io/kestra/plugin/kafka/Produce.java +++ b/src/main/java/io/kestra/plugin/kafka/Produce.java @@ -205,7 +205,7 @@ public Output run(RunContext runContext) throws Exception { count = resultFlowable .reduce(Integer::sum) - .block(); + .blockOptional().orElse(0); } } else { flowable = Flux.fromArray(((List) this.from).toArray()); @@ -213,7 +213,7 @@ public Output run(RunContext runContext) throws Exception { count = resultFlowable .reduce(Integer::sum) - .block(); + .blockOptional().orElse(0); } } else { producer.send(this.producerRecord(runContext, producer, (Map) this.from));