Closed Deepak16031 closed 1 month ago
Any reasoning for this, please? In most cases the Embedded Kafka is used for testing, where those logs are created in temporary folder which indeed is cleared after test suite lifecycle end.
Not any specific reason, Is it a bad idea to keep logs for "test" profile? They were created right, i hope that they could be useful if we can have them for any kind of debugging.
I would suggest then to use a real one or based on Testcontainers.
Even if we can fix EmbeddedKafkaZKBroker
for its logic:
CoreUtils.delete(kafkaServer.config().logDirs());
the EmbeddedKafkaKraftBroker
is based on the KafkaClusterTestKit
which does this unconditionally anyway, out of our control:
Utils.delete(this.baseDirectory);
Still the point of embedded Kafka is to quickly verify producer and consumer in your project. The log retention and it analysis is out of this project scope.
Closing the issue. Please re-open if there is an issue.
Expected Behavior
A flag to prevent logs deletion on embedded-kafka shutdown.
Current Behavior
All logs will be deleted on shutdown.
Context