refactoring notification consumer