find out the correct thread to receive message