static boolean checkErr(PrintStream output) {
        boolean gotError = output.checkError();
        if (gotError) {
            // This means no one is listening to our output stream anymore, time to shut down
            System.err.println("Unable to write to standard out, closing consumer.");
        }
        return gotError;
    }
Consumer that dumps messages to standard out.
tools/src/main/java/org/apache/kafka/tools/consumer/ConsoleConsumer.java