- Sleep for 1 second before stopping kafka server to allow clients to have chance to fetch last logs.
- Stop kafka server in finally block.
- Remove System.out