read messages and parse to tasks