doc.field("serviceName", queue.getServiceName());
doc.field("size", queue.size());
// doc.field("nextElement", queue.peek());
final LocalQueueStats stats = queue.getLocalQueueStats();
doc.field("minAge", stats.getMinAge());
doc.field("maxAge", stats.getMaxAge());
doc.field("avgAge", stats.getAvgAge());
doc.field("backupItemCount", stats.getBackupItemCount());
doc.field("emptyPollOperationCount", stats.getEmptyPollOperationCount());
doc.field("offerOperationCount", stats.getOfferOperationCount());
doc.field("eventOperationCount", stats.getEventOperationCount());
doc.field("otherOperationsCount", stats.getOtherOperationsCount());
doc.field("pollOperationCount", stats.getPollOperationCount());
doc.field("emptyPollOperationCount", stats.getEmptyPollOperationCount());
doc.field("ownedItemCount", stats.getOwnedItemCount());
doc.field("rejectedOfferOperationCount", stats.getRejectedOfferOperationCount());
List<Object> nextMessages = new ArrayList<Object>(STATS_MAX_MESSAGES);
for (Iterator<Object> it = queue.iterator(); it.hasNext();) {
Object next = it.next();
if (next != null)