retrieve messages according to insersion order.