receiving messages works with background thread as expected