using polling to get realtime messages