Added to use cap when there're many messages to be released.