indeedeng/java-dogstatsd-client — pull request #10 by michaelsembwever (2014-04-30 17:09:44+00:00)
Title: send messages using a lmax disruptor instead of a blockng queue

| This gives a significant performance increase in highly multithreaded jvms.
| http://lmax-exchange.github.io/disruptor/
|
| The lmax disruptor's ringBuffer size is initialised to 16k.
| Rationale here is that statsd msgs are short strings, and sending 10k/s is a normal use-case.
| If the Handler thread fails to send out the udp packets fast enough
| (given it also squashes statsd messages into available MTU space)
| and the ringBuffer becomes full then new statsd messages will be dropped and
| a InsufficientCapacityException passed to the exception handler…
|
| Exceptions from the lmax disruptor and handler are passed through to the exception handler.
| Throwables from the lmax disruptor are logged as SEVERE.