question: public void awaitTermination ( ) throws InterruptedException { do { logger . info ( "Awaiting completion of consumer." ) ; } while ( ! executor . awaitTermination ( 60 , TimeUnit . SECONDS ) ) ; logger . info ( "Consumer finished." ) ; }
target:  Blocks until all the queued tasks have finished and the thread pool is empty. This method should be called to free up resources when the consumer is no longer needed.