only receive the number of messages you need