[streaming] Updated API to use RichFunctions