This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit e121490a274339c2fb1800699527e8e947c20b48 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Tue Mar 29 14:23:55 2022 +0200 CAMEL-17802: make sure to unsubscribe before unlocking --- .../main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java index d324766..11b1121 100644 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java @@ -333,14 +333,14 @@ class KafkaFetchRecords implements Runnable { handleAccordingToStrategy(partitionLastOffset, e); } finally { - lock.unlock(); - // only close if not retry if (!isRetrying()) { LOG.debug("Closing consumer {}", threadId); safeUnsubscribe(); IOHelper.close(consumer); } + + lock.unlock(); } }