Get a set of messages by id.