Prepare rpc call for messages, add extract_message function and unit tests