handle blocking in getMessage