Adding pagination to the Message resource