Copied example code from EMDR for subscribing to the data stream