-
Bug
-
Resolution: Done
-
Minor
-
1.9.5.Final
-
None
-
False
-
None
-
False
In DebeziumEngine.java there is the following code:
// Initialize the offset store ...
try {
offsetStore.configure(workerConfig);
offsetStore.start();
}
catch (Throwable t) {
fail("Unable to configure and start the '" + offsetStoreClassName + "' offset backing store", t);
return;
}
If starting the offsetStore fails halfway through this may leak some resources, specifically this is the case for KafkaOffsetBackingStore in case the relevant kafka topic does not exist.
What Debezium connector do you use and what version?
1.9.5
What behaviour do you expect?
No leaking of resources
What behaviour do you see?
JMX beans statistics + threads from kafka admin clients are increasing
Implementation ideas (optional)
call offsetStore.stop() in the catch block.
(alternatively you may argue that if an offsetStore fails to start it should clean up all its resources by itself ... if you do I can make a ticket and PR for kafka instead)