final HttpHandler messageHandler = new HttpHandler() {
@Override
public void handleRequest(final HttpServerExchange exchange) throws Exception {
final ResponseCache cache = exchange.getAttachment(ResponseCache.ATTACHMENT_KEY);
if(!cache.tryServeResponse()) {
final String data = "Response " + responseCount.incrementAndGet();
exchange.getResponseHeaders().put(Headers.CONTENT_LENGTH, data.length() + "");
exchange.getResponseSender().send(data);
}
}