Limit the number of messages dequeued.