CORE-3969: modified the notification agent to work with the new database schema