replace total_consumer with spawn_coroutine