The `@PreDestroy` annotation marks a method that the Spring container invokes before tearing down a managed component. It provides a lifecycle hook for releasing resources during application shutdown. section 12.3
In a manually managed Kafka Streams application, the annotated method closes the `KafkaStreams` instance after the application has been started through an earlier lifecycle method. section 12.3
Closing Kafka Streams during shutdown
Annotate a teardown method and give Kafka Streams time to close cleanly: `@PreDestroy public void tearDown() { kafkaStreams.close(Duration.ofSeconds(10)); }`.
