protected void stop() {
        stopped = true;
        thread.interrupt();
    }
Called to stop the consumer thread (used for testing only).
gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcMetrics.java