for (int i = 0; i < loop; i++)
{
ConsumerHolder holder = consumerList.get(pos);
Consumer consumer = holder.consumer;
MessageReference ref;
if (holder.iter == null)
{
ref = messageReferences.removeFirst();
}
else
{
ref = holder.iter.next();
}
if (ref == null)
{
nullRefCount++;
if (holder.iter != null)
{
noMatchCount++;
}
}
else
{
if (checkExpired(ref))
{
if (holder.iter != null)
{
holder.iter.remove();
}
continue;
}
Consumer groupConsumer = null;
// If a group id is set, then this overrides the consumer chosen round-robin
SimpleString groupID = ref.getMessage().getSimpleStringProperty(Message.HDR_GROUP_ID);