Synchronize reactor shutdown with message adding