Move topic lookup into publishing thread.