return;
}
}
while(!_closed && (_started && (_recoveredMessage != null || !_messageConsumerList.isEmpty())))
{
Message msg;
MessageConsumerImpl consumer;
boolean recoveredMessage = _recoveredMessage != null;
if(recoveredMessage)
{
consumer = _recoveredConsumer;
msg = _recoveredMessage;
_recoveredMessage = null;
_recoveredConsumer = null;
}
else
{
consumer = _messageConsumerList.remove(0);
msg = consumer.receive0(0L);
}
MessageListener listener = consumer._messageListener;
MessageImpl message = consumer.createJMSMessage(msg, recoveredMessage);
if(message != null)
{
if(_acknowledgeMode == AcknowledgeMode.CLIENT_ACKNOWLEDGE)
{
consumer.setLastUnackedMessage(msg.getDeliveryTag());
}
_currentConsumer = consumer;
_currentMessage = msg;
try
{