Skip to content

Commit

Permalink
Merge pull request #3308 from apache/Kafka-Shutdown
Browse files Browse the repository at this point in the history
[ISSUE #3307] Kafka Consumer Shuts Down Properly
  • Loading branch information
xwm1992 authored Mar 2, 2023
2 parents 6636e3a + 7d37d23 commit 984537d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ public void start() {

public synchronized void shutdown() {
if (this.started.compareAndSet(true, false)) {
this.kafkaConsumer.close();
// Shutdown the executor and interrupt any running tasks
kafkaConsumerRunner.shutdown();
executorService.shutdown();
}
}

Expand Down

0 comments on commit 984537d

Please sign in to comment.