Handling a changing queue of messages