refactor the unattached message logic from worker to manager