if (holder.iter == null)
{
holder.iter = messageReferences.iterator();
}
MessageReference ref;
if (holder.iter.hasNext())
{
ref = holder.iter.next();
}
else
{
ref = null;
}
if (ref == null)
{
nullRefCount++;
}
else
{
if (checkExpired(ref))
{
holder.iter.remove();
refRemoved(ref);
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);
if (groupID != null)
{
groupConsumer = groups.get(groupID);