integrate queue and reader