Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.14.0
-
None
-
Unknown
Description
In KafkaFetchRecords, when an exception occurs inside startPolling method, the consumer is closed in finally block:
finally { lock.unlock(); // only close if not retry if (!isRetrying()) { LOG.debug("Closing consumer {}", threadId); IOHelper.close(consumer); } }
and then unsubscribing in run method fails with "This consumer has already been closed"
LOG.info("Terminating KafkaConsumer thread: {} receiving from topic: {}", threadId, topicName);
safeUnsubscribe();
IOHelper.close(consumer);
Attachments
Issue Links
- relates to
-
CAMEL-17493 camel-kafka: safe unsubscription should ignore safe exceptions
- Resolved
- links to