if (idCookie != null) {
queue = queues.get(idCookie.getValue());
}
// generate a unique queue id for this client if none was found
if(queue == null) {
idCookie = new Cookie(COOKIE_NAME, COOKIE_PREFIX + new UID().toString());
queue = new TimedBlockingQueue(queueSize, true);
queues.put(idCookie.getValue(), queue);
}
QUEUE_ID.set(idCookie.getValue());
request.getHttpResponse().addCookie(idCookie);