How Does Java process exits gracefully by shutting kafka consumers and producers during pod deletion in Kubernetes
When the kubectl pod delete command is issued, it isn’t waiting for the shutdown hook in a Java Kafka consumer and producer application to complete processing any unprocessed events. What steps need to be taken to ensure the application gracefully exits after the kubectl pod delete command is fired?