Add registration of listening and call back

Add registration of listening and call back, flushing to client when notification is received