synchronize on topic when looping