From e959150d5820aa932b82c00a54f21524a7371683 Mon Sep 17 00:00:00 2001 From: David Venable Date: Fri, 13 Sep 2024 14:15:51 -0500 Subject: [PATCH] Decrease the sleep when pausing the Kafka consumer to 1 second when the circuit breaker is in use. Signed-off-by: David Venable --- .../dataprepper/plugins/kafka/consumer/KafkaCustomConsumer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-prepper-plugins/kafka-plugins/src/main/java/org/opensearch/dataprepper/plugins/kafka/consumer/KafkaCustomConsumer.java b/data-prepper-plugins/kafka-plugins/src/main/java/org/opensearch/dataprepper/plugins/kafka/consumer/KafkaCustomConsumer.java index 9e6a979d8e..8a64c42e3b 100644 --- a/data-prepper-plugins/kafka-plugins/src/main/java/org/opensearch/dataprepper/plugins/kafka/consumer/KafkaCustomConsumer.java +++ b/data-prepper-plugins/kafka-plugins/src/main/java/org/opensearch/dataprepper/plugins/kafka/consumer/KafkaCustomConsumer.java @@ -357,7 +357,7 @@ public void run() { LOG.debug("Pause and skip consuming from Kafka topic due to an external condition: {}", pauseConsumePredicate); paused = true; consumer.pause(consumer.assignment()); - Thread.sleep(10000); + Thread.sleep(1000); continue; } else if(paused) { LOG.debug("Resume consuming from Kafka topic.");