@Override
    public void close() {
        LOGGER.info("Stopping metrics consumer: {0}...", metricConsumerName);
        this.running = false;
        metricQueue.clear();
    }
Batched metrics consumer. Uses a single spin-wait daemon thread to poll a {@link ManyToOneConcurrentArrayQueue}. Calls to {@link #offer(Object)} are thread safe.
<p>
This implementation will flush to the batchHandler as fast as it can, with a maximum batch size specified.
<p>
It is generally acceptable for implementors to use the metric processing thread to perform whatever actions are required to dispatch their metrics; new metrics will
be queued up until the thread becomes available again, as long as this is not an excessively long period of time (i.e. allowing the buffer to overflow).
<p>
Important: The List<M> provided to batchHandler is cleared after the callback returns, so don't hold onto it.

@author Marc Savy {@literal <marc@blackparrotlabs.io>}
gateway/engine/core/src/main/java/io/apiman/gateway/engine/metrics/BatchedMetricsConsumer.java