add method for getting persisted messages by annotation type