Use stream event api in example